when stripping comments out of scripts.
New test is comments-in-script.html
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::parseComment):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9099
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x316
+ RenderBlock {HTML} at (0,0) size 800x316
+ RenderBody {BODY} at (8,8) size 784x300
+ RenderImage {IMG} at (0,0) size 300x300 [bgcolor=#008000]
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<script><!--
+ var x="--"
+ //--></script>
+<img style="width:300px;height:300px; background-color:green" alt="--">
+2005-05-03 David Hyatt <hyatt@apple.com>
+
+ Fix for 4098281, news.com missing a bunch of content. Make sure not to apply strict SGML parsing
+ when stripping comments out of scripts.
+
+ New test is comments-in-script.html
+
+ * khtml/html/htmltokenizer.cpp:
+ (khtml::HTMLTokenizer::parseComment):
+
2005-05-03 David Hyatt <hyatt@apple.com>
Remove unused notification to avoid ERROR messages spewing on the acid2 test.
void HTMLTokenizer::parseComment(TokenizerString &src)
{
- bool strict = !parser->doc()->inCompatMode();
+ // FIXME: Why does this code even run for comments inside <script>? This seems bogus.
+ bool strict = !parser->doc()->inCompatMode() && !script;
int delimiterCount = 0;
bool canClose = false;
checkScriptBuffer(src.length());