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: Bad attributes/data handling in SGMLib
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: ajaksu2, eric.araujo, ezio.melotti, python-dev, r.david.murray, wolfete
Priority: normal Keywords: easy

Created on 2007-06-30 16:38 by wolfete, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bug_sgml.py wolfete, 2007-06-30 16:38 example
Messages (5)
msg32431 - (view) Author: Alvaro Lopez (wolfete) Date: 2007-06-30 16:38
When feeding an parser with a tag in which its arguments contain a < (as in <a href='http://www.example.org/"<;'>example</a> the SGMLParsers doesn't handle the data/arguments correcly. For example, with the above string I get:

Fed: <a href='http://www.example.org/">;'>example</a>
Tag opened: a
Arg  href  ->  http://www.example.org/">;
Arg escaped 'http://www.example.org/">;'
Data: ;'>example
Tag closed: a

I have attached a small example.

I'm using python2.5.1

Cheers,

Álvaro.
msg85628 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-04-06 10:00
Confirmed in trunk.
msg116699 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-09-17 18:15
Can we close this as sgmllib only supported htmllib which has been superseded by HTMLParser?
msg147613 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-11-14 16:57
New changeset 3c3009f63700 by Ezio Melotti in branch '2.7':
#1745761, #755670, #13357, #12629, #1200313: improve attribute handling in HTMLParser.
http://hg.python.org/cpython/rev/3c3009f63700

New changeset 16ed15ff0d7c by Ezio Melotti in branch '3.2':
#1745761, #755670, #13357, #12629, #1200313: improve attribute handling in HTMLParser.
http://hg.python.org/cpython/rev/16ed15ff0d7c

New changeset 426f7a2b1826 by Ezio Melotti in branch 'default':
#1745761, #755670, #13357, #12629, #1200313: merge with 3.2.
http://hg.python.org/cpython/rev/426f7a2b1826
msg147618 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-11-14 17:01
Fixed, thanks for the report!
History
Date User Action Args
2022-04-11 14:56:25adminsetgithub: 45143
2011-11-14 17:01:54ezio.melottisetstatus: open -> closed
versions: + Python 3.2, Python 3.3
messages: + msg147618

resolution: fixed
stage: needs patch -> resolved
2011-11-14 16:57:15python-devsetnosy: + python-dev
messages: + msg147613
2011-11-14 12:46:11ezio.melottisetassignee: ezio.melotti
2011-11-01 15:55:19ezio.melottisetnosy: + ezio.melotti
2010-12-09 05:46:47eric.araujosetnosy: + eric.araujo, r.david.murray, - BreamoreBoy
2010-09-17 18:15:21BreamoreBoysetnosy: + BreamoreBoy

messages: + msg116699
versions: + Python 2.7, - Python 2.6
2009-04-22 05:07:43ajaksu2setkeywords: + easy
2009-04-06 10:00:43ajaksu2setversions: + Python 2.6, - Python 2.5
nosy: + ajaksu2

messages: + msg85628

type: behavior
stage: needs patch
2007-06-30 16:38:49wolfetecreate