Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#7678 closed (duplicate)

markdown filter does not work with non-ASCII characters

Reported by: anonymous Owned by: nobody
Component: Contrib apps Version: master
Severity: Keywords: markup
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The markdown filter calls markdown with smart_str(value). This forces the value to utf-8. The markdown module does not accept a utf-8 str, only unicode or an ascii str. It raises an exception, informing the user of this fact, which django then ignores, resulting in no output from the filter.

Since markdown accepts unicode, there is no reason to call smart_str on the value, it can just be passed straight to markdown.

Attachments (1)

markdown_unicode_fix.diff (799 bytes) - added by anonymous 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by anonymous

comment:1 Changed 7 years ago by Karen Tracey <kmtracey@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

You specify version of SVN but this was already fixed in #6387? Are you using a version older than 3 months ago? Note the correct fix has to handle running with an old version of markdown as well, it did not support unicode until recently.

comment:2 Changed 7 years ago by Daniel Pope <dan@…>

For Markdown 1.6b, this is actually a duplicate of #5663.

Note: See TracTickets for help on using tickets.
Back to Top