Commit b9bfe11e by David Baumgold

Merge pull request #10902 from open-craft/unicode-certs

Fix issue with unicode characters in certificates.
parents 3e963578 f5c2f49e
......@@ -523,6 +523,16 @@ class CertificatesViewsTests(ModuleStoreTestCase, EventTrackingTestCase):
response = self.client.get(test_url)
self.assertIn('invalid', response.content)
@override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED, PLATFORM_NAME=u'Űńíćődé Űńívéŕśítӳ')
def test_render_html_view_with_unicode_platform_name(self):
test_url = get_certificate_url(
user_id=self.user.id,
course_id=unicode(self.course)
)
self._add_course_certificates(count=1, signatory_count=0)
response = self.client.get(test_url)
self.assertEqual(response.status_code, 200)
@override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED)
def test_render_html_view_with_preview_mode(self):
"""
......
......@@ -153,7 +153,7 @@ def _update_context_with_basic_info(context, course_id, platform_name, configura
# Translators: 'All rights reserved' is a legal term used in copyrighting to protect published content
reserved = _("All rights reserved")
context['copyright_text'] = '© {year} {platform_name}. {reserved}.'.format(
context['copyright_text'] = u'© {year} {platform_name}. {reserved}.'.format(
year=settings.COPYRIGHT_YEAR,
platform_name=platform_name,
reserved=reserved
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment