Skip to content
New issue

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

Link in code comment no longer relevant for HTML unescaping #100210

Open
jcamiel opened this issue Dec 13, 2022 · 0 comments
Open

Link in code comment no longer relevant for HTML unescaping #100210

jcamiel opened this issue Dec 13, 2022 · 0 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@jcamiel
Copy link

jcamiel commented Dec 13, 2022

Documentation

The link in

# see http://www.w3.org/TR/html5/syntax.html#tokenizing-character-references
is not longer relevant and should be replace:

The link should explain the source of the replacements table:

# see http://www.w3.org/TR/html5/syntax.html#tokenizing-character-references

_invalid_charrefs = {
    0x00: '\ufffd',  # REPLACEMENT CHARACTER
    0x0d: '\r',      # CARRIAGE RETURN
    0x80: '\u20ac',  # EURO SIGN
    0x81: '\x81',    # <control>
    0x82: '\u201a',  # SINGLE LOW-9 QUOTATION MARK
    0x83: '\u0192',  # LATIN SMALL LETTER F WITH HOOK
    0x84: '\u201e',  # DOUBLE LOW-9 QUOTATION MARK
    0x85: '\u2026',  # HORIZONTAL ELLIPSIS
    0x86: '\u2020',  # DAGGER
    0x87: '\u2021',  # DOUBLE DAGGER
    0x88: '\u02c6',  # MODIFIER LETTER CIRCUMFLEX ACCENT
    0x89: '\u2030',  # PER MILLE SIGN
    0x8a: '\u0160',  # LATIN CAPITAL LETTER S WITH CARON

Linked PRs

@jcamiel jcamiel added the docs Documentation in the Doc dir label Dec 13, 2022
@jcamiel jcamiel changed the title Link in code no longer relevant Link in code comment no longer relevant for HTML unescaping Dec 13, 2022
jcamiel added a commit to jcamiel/cpython that referenced this issue Dec 16, 2022
@ezio-melotti ezio-melotti self-assigned this Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

2 participants