Skip to content

Conversation

aero31aero
Copy link
Contributor

Previously, we'd unescape both > and > to the same
string because we were running the & => & replacement first.
By changing the order of this replacement, we now convert:

> > => > >

as expected.

Fixes #988.

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>
@waylan
Copy link
Member

waylan commented Jun 26, 2020

This looks good. Thank you. With a comment added to the release notes, this can be merged.

@waylan waylan added the requires-changes Awaiting updates after a review. label Jun 26, 2020
Previously, we'd unescape both `&amp;gt;` and `&gt;` to the same string because we were running the &amp; => & replacement first. By changing the order of this replacement, we now convert: `&amp;gt; &gt;` => `&gt; >` as expected. Fixes Python-Markdown#988.
@aero31aero
Copy link
Contributor Author

@waylan I added a line to the changelog. This is ready for review.

@waylan waylan merged commit 071c4f1 into Python-Markdown:master Jun 29, 2020
@waylan waylan added approved The pull request is ready to be merged. and removed requires-changes Awaiting updates after a review. labels Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved The pull request is ready to be merged.
2 participants