jez...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 6c2b54c

[1.1.X] Fixed #12892 - Fixed unicode related bug in a utility function of the admindocs app that prevented it to be used in non-English environments together with certain versions of docutils.

Backport from trunk, r13192

  • Participants
  • Parent commits 9debf09
  • Branches releases/1.1.X

Comments (0)

Files changed (1)

File django/contrib/admindocs/

 from email.Errors import HeaderParseError
 from django.utils.safestring import mark_safe
 from django.core.urlresolvers import reverse
+from django.utils.encoding import smart_str
     import docutils.core
     import docutils.nodes
         "link_base" : reverse('django-admindocs-docroot').rstrip('/')
     if thing_being_parsed:
-        thing_being_parsed = "<%s>" % thing_being_parsed
+        thing_being_parsed = smart_str("<%s>" % thing_being_parsed)
     parts = docutils.core.publish_parts(text, source_path=thing_being_parsed,
                 destination_path=None, writer_name='html',