This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
标题: Refactor HTMLParser.unescape to use html.entities.html5
类型: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.3
process
状态: closed Resolution: fixed
Dependencies: 后续:
分配给: ezio.melotti 抄送列表: eric.araujo, ezio.melotti, python-dev, r.david.murray
优先级: normal 关键字: patch

Created on 2012-06-24 02:45 by ezio.melotti, last changed 2022-04-11 14:57 by admin. This issue is now closed.

文件
文件名 上传时间 Description 编辑
issue15156.diff ezio.melotti, 2012-06-24 14:26 review
issue15156-2.diff ezio.melotti, 2012-06-24 17:35 review
Messages (5)
msg163702 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) 日期: 2012-06-24 02:45
HTMLParser has an internal method called unescape [0] used to convert named character references to the equivalent characters, and it does so by using html.entities.name2codepoint to recreate the equivalent of html.entities.entityrefs with the addition of '.
Now that the html5 entities have been added to html.entities, the parser should use them instead of name2codepoint.

[0]: see Lib/html/parser.py:500
msg163790 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) 日期: 2012-06-24 14:26
Here's a patch, please review.
msg163811 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) 日期: 2012-06-24 17:35
Patch updated after the review.
msg163837 - (view) Author: Roundup Robot (python-dev) (Python triager) 日期: 2012-06-24 20:04
New changeset 0d53703b1a99 by Ezio Melotti in branch 'default':
#15156: HTMLParser now uses the new "html.entities.html5" dictionary.
http://hg.python.org/cpython/rev/0d53703b1a99
msg163838 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) 日期: 2012-06-24 20:05
Fixed, thanks for the reviews!
历史
日期 用户 动作 参数
2022-04-11 14:57:31admin修改github: 59361
2012-06-24 20:05:35ezio.melotti修改状态: open -> closed
resolution: fixed
消息: + msg163838

stage: patch review -> resolved
2012-06-24 20:04:09python-dev修改抄送: + python-dev
消息: + msg163837
2012-06-24 17:35:31ezio.melotti修改文件: + issue15156-2.diff

消息: + msg163811
2012-06-24 14:26:50ezio.melotti修改文件: + issue15156.diff
keywords: + patch
消息: + msg163790

stage: needs patch -> patch review
2012-06-24 02:45:42ezio.melotti创建