We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To Reproduce
from bleach import Linker linker = Linker() text = 'http://test.com?a=1&par=1¶meterA=2' print(linker.linkify(text)) ## prints: <a href="http://test.com?a=1&par=1¶meterA=2" rel="nofollow">http://test.com?a=1&par=1¶meterA=2</a>
Expected behavior
## prints: <a href="http://test.com?a=1&par=1&parameterA=2" rel="nofollow">http://test.com?a=1&par=1&parameterA=2</a>
Additional context
I believe this might happen somewhere in the html5lib_shim.py / BleachHTMLSerializer class:
bleach/bleach/html5lib_shim.py
Line 661 in ed06d4e
The text was updated successfully, but these errors were encountered:
¶ is being consumed as an entity. We fixed this in clean and I think we need to fix linkify in a similar way.
¶
Sorry, something went wrong.
There are more entities with the same effect, ie. ¬ ® :
from bleach import Linker linker = Linker() text = 'http://test.com?a=1¬ify=1®ister=2' print(linker.linkify(text)) ## prints: <a href="http://test.com?a=1¬ify=1®ister=2" rel="nofollow">http://test.com?a=1¬ify=1®ister=2</a>
Adding for context:
This is related to #294 . The W3C calls this "fragile syntax".
IIRC, prior to the HTML5 spec the trailing semicolon for named references was NOT required, but it has been required since then. (see "Errors involving fragile syntax constructs" in the original https://dev.w3.org/html5/spec-LC/Overview.html and the current https://html.spec.whatwg.org/#syntax-errors )
Successfully merging a pull request may close this issue.
To Reproduce
Expected behavior
Additional context
I believe this might happen somewhere in the html5lib_shim.py / BleachHTMLSerializer class:
bleach/bleach/html5lib_shim.py
Line 661 in ed06d4e
The text was updated successfully, but these errors were encountered: