Skip to content

Conversation

@Crozzers
Copy link
Contributor

This PR fixes #660. Mostly a number of safemode regressions and edgecases not quite fixed in #659.

First change is I've tweaked _hash_html_spans to avoid processing raw markdown code spans, as they can often be made to look like they contain HTML. It does this by hashing those segments and ignoring them. The code is then processed as normal and encoded later on in the process.

Second, I fixed escaped tags not being processed correctly by checking for any escapes and consuming them in _encode_incomplete_tags.

Finally, code spans with a lexer attached were getting joined to lists above them. An attempted fix was made in #659 by playing around with adding/removing newlines after the code block.
This change fixes that by just checking for user inserted newlines surrounding the code block in the markdown and preserving those, rather than playing guessing games with what we think will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

safe_mode='escape' problems/regressions

1 participant