Opened 15 years ago

Closed 12 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

Description

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

Change History (6)

comment:1 by Russell Keith-Magee, 15 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Gabriel Hurley, 14 years ago

Component: Contrib appscontrib.markup

comment:3 by Julien Phalip, 14 years ago

Severity: Normal
Type: Bug

comment:4 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:6 by Tim Graham, 12 years ago

Resolution: wontfix
Status: newclosed

markdown is deprecated

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