Fixes #2748.
pretty please pagure-ci rebuild
1 new commit added
Escape single and double quotes as well, plus add test
2 new commits added
Show VCS and DistURL tags as links when appropriate
Don't encode already encoded entities
Test is failing here (flake8) - E302 expected 2 blank lines, found 1
E302 expected 2 blank lines, found 1
It is not doing the same thing as before. e.g. ``re.sub(r'&(?![a-zA-Z0-9#]+;)', '&', 'a&<x') -> a&<x
The previous code replaced & for &, and then fixed the HTML character references it broke in the first pass.
&
&
This line replaces & only when it's not part of a character reference. It's true that this isn't exactly the same because now it preserves all character references, and not just those four, but is that a bad thing?
Make flake8 happy
I've gone through some pages with mixed content and it seems to work correctly. @mikem any idea if this still can break some page?
For what it's worth, we've been running with this patch in production for the last couple of weeks and we haven't noticed any issues.
Metadata Update from @tkopecek: - Pull-request tagged with: testing-ready
:thumbsup:
Metadata Update from @jobrauer: - Pull-request tagged with: testing-done
Commit 8d13743e fixes this pull-request
Pull-Request has been merged by tkopecek
Fixes #2748.