Menu

#117 Parsing of css content property incorrect

v 2.9
closed-fixed
nobody
None
5
2014-05-19
2014-05-14
Megan
No

Parsing the following HTML results in an incorrect truncating of the style tag.

<div id="mainDiv">
<style>.footer
{
    content: "<br/>";
    font-family: Times New Roman; 
    font-size: 16px;        
}
</style>
<div id="buttonDiv">
</div>

Discussion

  • Scott Wilson

    Scott Wilson - 2014-05-19

    Hi Megan,

    Yes I can confirm this; when it encounters the BR tag in quotes it treats it as a tag node and closes the style tag. However in this case it should be looking for the end style node first. I'll see if there's a way to fix this.

    S

     
  • Scott Wilson

    Scott Wilson - 2014-05-19
    • Group: v 2.8 --> v 2.9
     
  • Scott Wilson

    Scott Wilson - 2014-05-19

    I've modified the way style tags are treated by HtmlTokenizer to mirror how script tags are handled (which can also contain things that looks like tags but aren't, such as formulas, as well as quoted tags). This handles the case above, and doesn't break any other tests.

     
  • Scott Wilson

    Scott Wilson - 2014-05-19
    • status: open --> closed-fixed
     

Log in to post a comment.