GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Link in code comment no longer relevant for HTML unescaping · Issue #100210 · python/cpython

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

New issue
Copy link
New issue
Copy link
Closed
Closed
Link in code comment no longer relevant for HTML unescaping#100210
Copy link
Assignees
ezio-melotti
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir

Description

@jcamiel
jcamiel
opened on Dec 13, 2022
Issue body actions

Documentation

The link in

cpython/Lib/html/__init__.py

Line 28 in 0e081a0

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

  • current link http://www.w3.org/TR/html5/syntax.html#tokenizing-character-references
  • more accurate link https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state

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

  • gh-100210: Correct the comment link for unescaping HTML #100212
  • [3.11] gh-100210: Correct the comment link for unescaping HTML (GH-100212) #102044
  • [3.10] gh-100210: Correct the comment link for unescaping HTML (GH-100212) #102045

Activity

  1. jcamiel
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Dec 13, 2022
  2. jcamiel
    changed the title [-]Link in code no longer relevant[/-] [+]Link in code comment no longer relevant for HTML unescaping[/+] on Dec 13, 2022
  3. ezio-melotti
    self-assigned this
    on Dec 16, 2022
  4. ezio-melotti
    added a commit that references this issue on Feb 19, 2023

    gh-100210: Correct the comment link for unescaping HTML (#100212)

    9a07eff
  5. miss-islington
    added 3 commits that reference this issue on Feb 19, 2023

    pythongh-100210: Correct the comment link for unescaping HTML (python…

    5ced514

    pythongh-100210: Correct the comment link for unescaping HTML (python…

    5d4447e

    gh-100210: Correct the comment link for unescaping HTML (GH-100212)

    8520e6c
  6. carljm
    added a commit that references this issue on Feb 20, 2023

    Merge branch 'main' into inlinecomp2

    9f0fc5b
  7. ezio-melotti
    added a commit that references this issue on Feb 20, 2023

    [3.11] gh-100210: Correct the comment link for unescaping HTML (GH-10…

    e9103e6
  8. ezio-melotti commented on Feb 20, 2023

    @ezio-melotti
    ezio-melotti
    on Feb 20, 2023
    Member
    More actions

    Fixed, thanks for the report and then PR!

    Reacted by Jean-Christophe Amiel
  9. ezio-melotti
    closed this as completedon Feb 20, 2023
  10. carljm
    added a commit that references this issue on Feb 22, 2023

    Merge branch 'main' into inlinecomp

    544b30c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @ezio-melotti
    ezio-melotti

Labels

docsDocumentation in the Doc dirDocumentation in the Doc dir

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.