Fix unescaping of HTML characters <> in CodeHilite.#990
Merged
waylan merged 2 commits intoPython-Markdown:masterfrom Jun 29, 2020
Merged
Fix unescaping of HTML characters <> in CodeHilite.#990waylan merged 2 commits intoPython-Markdown:masterfrom
waylan merged 2 commits intoPython-Markdown:masterfrom
Conversation
aero31aero
added a commit
to aero31aero/zulip
that referenced
this pull request
Jun 25, 2020
This fixes an issues that causes HTML entities inside of inline code blocks to be converted rather than being displayed literally. The upstream python-markdown now handles this correctly, so we just use their implementation with our changes for removing .strip(). As a result of this migration, we switch backtick pattern to an inline processor too. Fixes zulip#12056. For the codeblock counterpart of this issue, we should follow the upstream PR Python-Markdown/markdown#990. Co-authored-by: Rohitt Vashishtha <aero31aero@gmail.com>
timabbott
pushed a commit
to zulip/zulip
that referenced
this pull request
Jun 25, 2020
This fixes an issues that causes HTML entities inside of inline code blocks to be converted rather than being displayed literally. The upstream python-markdown now handles this correctly, so we just use their implementation with our changes for removing .strip(). As a result of this migration, we switch backtick pattern to an inline processor too. Fixes #12056. For the codeblock counterpart of this issue, we should follow the upstream PR Python-Markdown/markdown#990. Co-authored-by: Rohitt Vashishtha <aero31aero@gmail.com>
Member
|
This looks good. Thank you. With a comment added to the release notes, this can be merged. |
Previously, we'd unescape both `&gt;` and `>` to the same string because we were running the & => & replacement first. By changing the order of this replacement, we now convert: `&gt; >` => `> >` as expected. Fixes Python-Markdown#988.
Contributor
Author
|
@waylan I added a line to the changelog. This is ready for review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, we'd unescape both
&gt;and>to the samestring because we were running the & => & replacement first.
By changing the order of this replacement, we now convert:
&gt; >=>> >as expected.
Fixes #988.