trentm / python-markdown2

markdown2: A fast and complete implementation of Markdown in Python
Other
2.64k stars 431 forks source link

Fix incomplete comments in safe mode not being escaped (#563) #564

Closed Crozzers closed 8 months ago

Crozzers commented 8 months ago

This PR fixes #563 by amending the _incomplete_tags_re to also search for HTML comments. This change means that unclosed/incomplete HTML comments will be properly escaped and won't result in the rest of the document being commented out.

nicholasserra commented 8 months ago

Thank you!