[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-18 Thread Ezio Melotti
Ezio Melotti 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-18 Thread Roundup Robot
Roundup Robot 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 '3.2': #13358: HTMLParser now calls

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-18 Thread Ezio Melotti
Ezio Melotti 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-17 Thread Michael Brooks
Michael Brooks 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 is encountered (and if this tag found anywhere, even i

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Ezio Melotti
Ezio Melotti 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 say that handle_data()

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Michael Brooks
Michael Brooks 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 Melotti wrote: > > Ezio M

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Ezio Melotti
Ezio Melotti 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 seems to happen wheneve

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Ezio Melotti
Ezio Melotti 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 __

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Michael Brooks
Michael Brooks added the comment: Has anyone else been able to verify this? On Mon, Nov 7, 2011 at 7:46 AM, Michael Brooks wrote: > > Michael Brooks 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

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-07 Thread Michael Brooks
Michael Brooks 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 wrote: > > Michael Brooks added the comment: > > Yes I am running python 2.7.2. > > On Sun, Nov 6, 2011 at 12:52 PM, Ezio Melotti >wrote:

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-06 Thread Michael Brooks
Michael Brooks added the comment: Yes I am running python 2.7.2. On Sun, Nov 6, 2011 at 12:52 PM, Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Have you tried with the latest 2.7? (see msg147170) > > -- > nosy: +ezio.melotti > stage: -> test needed > > _

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-06 Thread Ezio Melotti
Ezio Melotti added the comment: Have you tried with the latest 2.7? (see msg147170) -- nosy: +ezio.melotti stage: -> test needed ___ Python tracker ___

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-06 Thread Michael Brooks
Changes by Michael Brooks : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-06 Thread Michael Brooks
New submission from Michael Brooks : 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 tag, NO OTHER tag can close this d