[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Attached patch should solve the issue. -- assignee: - ezio.melotti keywords: +patch stage: test needed - commit review versions: +Python 3.2, Python 3.3 Added file: http://bugs.python.org/file23721/issue13358.diff

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 91163aa3d5b4 by Ezio Melotti in branch '2.7': #13358: HTMLParser now calls handle_data only once for each CDATA. http://hg.python.org/cpython/rev/91163aa3d5b4 New changeset 0a32e7e3aa1f by Ezio Melotti in branch

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This should be fixed now, let me know if you find other problems with the parser. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Michael Brooks
Michael Brooks firealwayswo...@gmail.com added the comment: Has anyone else been able to verify this? On Mon, Nov 7, 2011 at 7:46 AM, Michael Brooks rep...@bugs.python.orgwrote: Michael Brooks firealwayswo...@gmail.com added the comment: This one should also have a priority change. Tested

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I'm working on it, but a minimal example seems to work fine. (P.S. there's no need to quote the previous message(s) while replying) -- ___ Python tracker rep...@bugs.python.org

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: It seems to me that the arguments are parsed correctly, but handle_data is called multiple time between handle_starttag and handle_endtag. This might happen, e.g. in case the source lines are fed one by one to the parser, but in this case

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Michael Brooks
Michael Brooks firealwayswo...@gmail.com added the comment: Ok so until you fix this bug, i'll be overriding HTMLParser with my fix, becuase this is a blocking issue for my project. My HTMLParser must behave like a browser, period end of story. Thanks. On Thu, Nov 17, 2011 at 9:24 AM, Ezio

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: It already behaves like a browser, it just gives you data in chunks instead of calling handle_data() only once at the end. The documentation is not clear about this though. It says that feed() can be called several times, but it doesn't

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Michael Brooks
Michael Brooks firealwayswo...@gmail.com added the comment: Oah, then there is a misunderstanding. No browser will parse the html that is declared within a javascript variable, it must be treated as a continues data segment (with cdata properties) until the exit /\s*script\s* is encountered

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-07 Thread Michael Brooks
Michael Brooks firealwayswo...@gmail.com added the comment: This one should also have a priority change. Tested python 2.7.3 --MIke On Sun, Nov 6, 2011 at 12:54 PM, Michael Brooks rep...@bugs.python.orgwrote: Michael Brooks firealwayswo...@gmail.com added the comment: Yes I am running

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-06 Thread Michael Brooks
New submission from Michael Brooks firealwayswo...@gmail.com: The HTML tag at the bottom of this page correctly identified has having cdata like properties and trigger set_cdata_mode(). Due to the cdata properties of this tag, the only way to end the data segment is with a closing /script

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-06 Thread Michael Brooks
Changes by Michael Brooks firealwayswo...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13358 ___ ___

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-06 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Have you tried with the latest 2.7? (see msg147170) -- nosy: +ezio.melotti stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13358

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-06 Thread Michael Brooks
Michael Brooks firealwayswo...@gmail.com added the comment: Yes I am running python 2.7.2. On Sun, Nov 6, 2011 at 12:52 PM, Ezio Melotti rep...@bugs.python.orgwrote: Ezio Melotti ezio.melo...@gmail.com added the comment: Have you tried with the latest 2.7? (see msg147170) --