Regression in unescaping backslash in TOC title · Issue #1360 · Python-Markdown/markdown (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@oprypin

Description

@oprypin

Now I found another issue similar to #1358 and I checked that its fix doesn't also fix this one.

Regression in 3.4 - c0f6e5a is the first bad commit

Reproduction code:

import markdown

md = markdown.Markdown(extensions=['toc']) s = r'''

hello [foo]

''' md.convert(s) print(md.toc_tokens)

Output before vs after:

[{'level': 3, 'id': 'hello-foo', 'name': 'hello [foo]', 'children': []}]

[{'level': 3, 'id': 'hello-foo', 'name': 'hello \x0291\x03foo]', 'children': []}]