Share

HtmlCleaner

Tracker: Bugs

5 HtmlTokenizer incorrectly handles empty script tags - ID: 2038023
Last Update: Comment added ( scottwilson )

The <script> tag is incorrectly handled when the script tag is an
empty element, as in:

<script type="text/javascript" src="file.js" />

If something follows the closed script tag, the tokenizer incorrectly
treats the content as child elements of the script tag.

The tokenizer should treat the script element as closed, such as:

<script type="text/javascript" src="file.js" > </script>


Ben Barber ( barberboy ) - 2008-08-04 20:49

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 2 )




Date: 2009-11-05 23:57
Sender: scottwilson

This patch should have been applied ages ago - I just found this same
problem affecting a project I work on. Is HtmlCleaner no longer actively
maintained?


Date: 2008-08-05 17:38
Sender: barberboy


My apologies for the ugly text. An empty element example is:

<script type="text/javascript" src="file.js" />

Which should be treated as closed, with NO child elements, such as:

<script type="text/javascript" src="file.js"></script>


Log in to comment.

Attached File ( 1 )

Filename Description Download
HtmlTokenizer.java.patch HtmlTokenizer.java patch for empty script handling Download

Change ( 1 )

Field Old Value Date By
File Added 287056: HtmlTokenizer.java.patch 2008-08-04 20:49 barberboy