Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#7678 closed (duplicate)

markdown filter does not work with non-ASCII characters

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


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 15 years ago.

Download all attachments as: .zip

Change History (3)

Changed 15 years ago by anonymous

Attachment: markdown_unicode_fix.diff added

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

Resolution: duplicate
Status: newclosed

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 15 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