[issue13358] HTMLParser incorrectly handles cdata elements.

Michael Brooks report at bugs.python.org
Thu Nov 17 19:28:35 CET 2011


Michael Brooks <firealwaysworks at 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 (and if this tag found anywhere,  even in a
quoted string it will still terminate this data segment,  because its a
cdata element).   The snip of html provided must only be a single data
segment. </ alone is not a proper terminator.

Thu, Nov 17, 2011 at 11:17 AM, Ezio Melotti <report at bugs.python.org> wrote:

>
> Ezio Melotti <ezio.melotti at 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 say that handle_data() (and possibly other methods)
> might get called more than once.  This seems to always be the case while
> calling feed() several times.
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue13358>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13358>
_______________________________________


More information about the Python-bugs-list mailing list