homepage

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
Title: HTMLParser doesn't know how to deal with 'ampersand'
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, pyed
Priority: normal Keywords:

Created on 2015年02月10日 22:01 by pyed, last changed 2022年04月11日 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
htmlparser_bugs.py pyed, 2015年02月10日 22:01 demonstrating HTMLParser behaviour with '&'
Messages (2)
msg235714 - (view) Author: pyed (pyed) Date: 2015年02月10日 22:01
the attached file use example from : https://docs.python.org/3/library/html.parser.html
and it will show different cases where HTMLParser fail to parse '&' and '&'
msg235715 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2015年02月10日 22:31
& is an entity reference.
Either pass "convert_charrefs=True" to the constructor, or implement a method "def handle_entityref(self, data)" to receive them as events.
https://docs.python.org/3.4/library/html.parser.html 
History
Date User Action Args
2022年04月11日 14:58:12adminsetgithub: 67626
2015年02月10日 22:31:10amaury.forgeotdarcsetstatus: open -> closed

nosy: + amaury.forgeotdarc
messages: + msg235715

resolution: not a bug
2015年02月10日 22:02:38pyedsettitle: HTMLParser don't know how to deal with 'ampersand' -> HTMLParser doesn't know how to deal with 'ampersand'
2015年02月10日 22:01:22pyedcreate

AltStyle によって変換されたページ (->オリジナル) /