Home » XML » XML_HTMLSax » Bug #6742
Error handling <![if tags
Details
| Submitted | 2006-02-10 10:05 UTC |
|---|---|
| From | jon at jonemerson dot net |
| Status | Open |
| Package | XML_HTMLSax |
| PHP Version | 4.4.2 |
| OS | Windows |
| Roadmaps | (Not assigned) |
Comments
[2006-02-10 10:05 UTC] jon at jonemerson dot net
Description:
------------
In Yahoo!'s search results, and on many other pages, there's a tag <![if !IE]>. If XML_HTMLSax runs across this tag, it assumes it's a CDATA tag and looks for it to be terminated by ]]>. This is incorrect. Instead it should not make this assumption and should look for a termination of ]>.
To fix this bug, change lines 224 through 232 (or so) of XML_HTMLSax_States.php to:
} else if ( $char == '[') {
$text = $context->scanUntilString(']>');
$context->IgnoreCharacter();
} else ...
This will take away the CDATA assumption and look for ]> instead.