#11388: Markdown "safe" feature unclear -----------------------------------+---------------------------------------- Reporter: franc...@verbeek.name | Owner: nobody Status: new | Milestone: Component: Contrib apps | Version: 1.0 Keywords: | Stage: Unreviewed Has_patch: 0 | -----------------------------------+---------------------------------------- the behaviour of markdown is weird when using the "safe" option : using markdown 1.6.2 rc-2 when markdown is used with defaults, html in the original text is not escaped, while when passed the "safe" option, it is escaped. I haven't checked whether the problem exists with other versions of markdown, but with 1.6.2 the following (from contrib/markup/templatetags/markup.py) should be used instead
{{{ if hasattr(markdown, 'version'): extensions = [e for e in arg.split(",") if e] if len(extensions) > 0 and extensions[0] == "safe": extensions = extensions[1:] safe_mode = False else: safe_mode = True }}} -- Ticket URL: <http://code.djangoproject.com/ticket/11388> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---