Code

Opened 5 years ago

Closed 19 months 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

Attachments (0)

Change History (6)

comment:1 Changed 4 years ago by russellm

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

comment:2 Changed 3 years ago by gabrielhurley

  • Component changed from Contrib apps to contrib.markup

comment:3 Changed 3 years ago by julien

  • Severity set to Normal
  • Type set to Bug

comment:4 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:6 Changed 19 months ago by timo

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

markdown is deprecated

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.