Opened 7 years ago

Closed 4 years ago

#11388 closed Bug (wontfix)

Markdown "safe" feature unclear

Reported by: francois@… Owned by: nobody
Component: contrib.markup Version: 1.0
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


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/ 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
                safe_mode = True

Change History (6)

comment:1 Changed 6 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 5 years ago by gabrielhurley

  • Component changed from Contrib apps to contrib.markup

comment:3 Changed 5 years ago by julien

  • Severity set to Normal
  • Type set to Bug

comment:4 Changed 4 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 4 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:6 Changed 4 years ago by timo

  • Resolution set to wontfix
  • Status changed from new to closed

markdown is deprecated

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