Python-Markdown / markdown

A Python implementation of John Gruber’s Markdown with Extension support.
https://python-markdown.github.io/
BSD 3-Clause "New" or "Revised" License
3.74k stars 858 forks source link

Move backslash unescaping to treeprocessor #1272

Closed waylan closed 2 years ago

waylan commented 2 years ago

By unescaping backslash escapes in a treeprocessor, the text is properly escaped during serialization. Fixes #1131.

As it is recognized that varous third-party extensions may be calling the old class at postprocessors.UnescapePostprocessor the old class remains in the codebase, but has been deprecated and will be removed in a future release. The new class treeprocessors.UnescapeTreeprocessor should be used instead.

facelessuser commented 2 years ago

I'll try and look at this soon. I'd like to pull it and see how it impacts some of my things.