]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-69426: HTMLParser: only unescape properly terminated character entities in attribu...
authorSascha Ißbrücker <sascha.issbruecker@googlemail.com>
Wed, 7 May 2025 15:49:49 +0000 (17:49 +0200)
committerGitHub <noreply@github.com>
Wed, 7 May 2025 15:49:49 +0000 (18:49 +0300)
commit77b14a6d58e527f915966446eb0866652a46feb5
treeac72abe110ce2b79812905553e5ba28354e49125
parent3dfed230928de0f649061782a36691066a0ef058
gh-69426: HTMLParser: only unescape properly terminated character entities in attribute values (GH-95215)

According to the HTML5 spec, named character references in attribute values
should only be processed if they are not followed by an ASCII alphanumeric,
or an equals sign.

https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
Lib/html/parser.py
Lib/test/test_htmlparser.py
Misc/NEWS.d/next/Library/2022-07-24-20-56-32.gh-issue-69426.unccw7.rst [new file with mode: 0644]