From a29485960df402647842366bdc59d0bdd6400c89 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Thu, 27 Mar 2014 23:00:02 +0800 Subject: [PATCH] Update course_about.html if course title use Chinese or other language got the 500 error when visit the course_about page ,and the log shows :UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128) --- lms/templates/courseware/course_about.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/templates/courseware/course_about.html b/lms/templates/courseware/course_about.html index 8023c6734b..a4467b385a 100644 --- a/lms/templates/courseware/course_about.html +++ b/lms/templates/courseware/course_about.html @@ -238,7 +238,7 @@ tweet_action = "http://twitter.com/intent/tweet?text=I+just+registered+for+{number}+{title}+through+{account}:+{url}".format( number=course.number, - title=get_course_about_section(course, 'title'), + title=get_course_about_section(course, 'title').encode('utf-8'), account=microsite.get_value('course_about_twitter_account', '@edxonline'), url="http://{domain}{path}".format( domain=site_domain,