Processing non-ascii tags and attributes in HTMLParser
Aperta
@serhiy-storchaka ci sta già lavorando.
Dal 19/11/2025.
3.13
3.14
3.15
stdlib
type-bug
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
Bug report
html.parser.HTMLParser convert names of tags and attributes to lower case. But the HTML5 specification only prescripts converting ASCII upper alpha characters to lower case.
- https://html.spec.whatwg.org/multipage/parsing.html#tag-name-state
- https://html.spec.whatwg.org/multipage/parsing.html#attribute-name-state
There are some non-ASCII characters which are converted to ASCII lowercase characters (e.g. "ß" -> "ss", "K" (U+212A) -> "k", "ſ" -> "s"). They will be parsed differently by HTMLParser and any other parser or browser.
Linked PRs
- gh-141758
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.