From d20eb077220e9e38eb6873c5f521eb38338437d5 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 16 Jul 2012 11:25:58 -0400 Subject: [PATCH] Allow UTF-8 chars in about sections. --- common/lib/xmodule/xmodule/course_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 8435cfca9e..ff0302a26f 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -62,7 +62,7 @@ class CourseDescriptor(SequenceDescriptor): 'requirements', 'syllabus', 'textbook', 'faq', 'more_info', 'number', 'instructors']: try: with self.system.resources_fs.open(path("about") / section_key + ".html") as htmlFile: - return htmlFile.read() + return htmlFile.read().decode('utf-8') except ResourceNotFoundError: log.exception("Missing about section {key} in course {url}".format(key=section_key, url=self.location.url())) return "! About section missing !" @@ -91,7 +91,7 @@ class CourseDescriptor(SequenceDescriptor): if section_key in ['handouts', 'guest_handouts', 'updates', 'guest_updates']: try: with self.system.resources_fs.open(path("info") / section_key + ".html") as htmlFile: - return htmlFile.read() + return htmlFile.read().decode('utf-8') except ResourceNotFoundError: log.exception("Missing info section {key} in course {url}".format(key=section_key, url=self.location.url())) return "! Info section missing !"