RetroZilla/parser/htmlparser/tests/html/comments.html
2015-10-20 23:03:22 -04:00

311 lines
16 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML lang="en">
<HEAD>
<META name="author" content="Ian Hickson">
<META name="copyright" content="&copy; copyright 1999 Ian Hickson">
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META http-equiv="Content-Style-Type" content="text/css">
<TITLE>Evil Tests: Comments</TITLE>
<STYLE TYPE="text/css">
.test { background: purple; color: yellow; font-weight: bolder; padding: 0.3em; border: 3px solid fuchsia; }
.note { font-weight: bolder; color: green; }
</STYLE>
</HEAD>
<BODY>
<H1>Comments</H1>
<p>If you have any comments to make regarding this test, e-mail <a
href="mailto:py8ieh=eviltests-comments@bath.ac.uk">py8ieh=eviltests@bath.ac.uk</a>.</p>
<dl>
<dt>Prerequisites</dt>
<dd>Browsers that are subjected to this test should support the
SGML comments: <code>&lt;!-- -- -- --&gt;</code>.</dd>
</dl>
<h2>1. The comment delimited is <code>--</code></h2>
<p class="note">Note that there are four (4) sub-tests to this
section. Because of the nature of these tests, some may not appear. If
so, there is a bug. I repeat: there should be four separate tests in
section 1! Each consists of a bit of explanatory text, a purple box
with yellow text, and some explanatory markup.</p>
<P>The comment delimiter is <code>--</code>, not <code>&lt;!--</code>
and <code>--&gt</code>. In the following sentence, the word
<q>INCORRECTLY</q> should not appear:</P>
<P class=test>This browser parses comments <!-- -- -->
INCORRECTLY! Yes, I said in<!-- -- -->correctly.</P>
<!-- -->
<P>The markup used was:</P>
<PRE>
&lt;P&gt;This browser parses comments &lt;!-- -- --&gt; INCORRECTLY!
Yes, I said in&lt;!-- -- --&gt;correctly.&lt;/P&gt;
</PRE>
<P>If you take <code>--</code> to be the comment delimiter, you can
easily see that the words in the middle are actually inside a
comment.</P>
<P>Here is another:</P>
<P class=test>This browser parses comments
<!---- -->INCORRECTLY! Yes, I said in<!------>correctly.</P>
<P>The markup used was:</P>
<PRE>
&lt;P&gt;This browser parses comments
&lt;!---- --&gt;INCORRECTLY! Yes, I said in&lt;!------&gt;correctly.&lt;/P&gt;
</PRE>
<p>Note that it is a serious error if this is the paragraph
immediately after the test line! There should be some commentary
(including a snippet of the source of the last test) between this
paragraph and the previous test.</p>
<P>Here is yet another:</P>
<P class=test>This browser parses comments
<!------>INCORRECTLY! Yes, I said in<!------>correctly.</P>
<P>The markup used was:</P>
<PRE>
&lt;P&gt;This browser parses comments
&lt;!------&gt;INCORRECTLY! Yes, I said in&lt;!------&gt;correctly.&lt;/P&gt;
</PRE>
<p>Note that it is a serious error if this is the paragraph
immediately after the test line! There should be some commentary
(including a snippet of the source of the last test) between this
paragraph and the previous test.</p>
<P>And finally, here is yet another. Hopefully that should cover all bases...</P>
<P class=test>This browser parses comments
<!-- ---->INCORRECTLY! Yes, I said in<!------>correctly.</P>
<P>The markup used was:</P>
<PRE>
&lt;P&gt;This browser parses comments
&lt;!-- ----&gt;INCORRECTLY! Yes, I said in&lt;!------&gt;correctly.&lt;/P&gt;
</PRE>
<p>Note that it is a serious error if this is the paragraph
immediately after the test line! There should be some commentary
(including a snippet of the source of the last test) between this
paragraph and the previous test.</p>
<h2>2. Comments should not mess up whitespace collapsing!</h2>
<P>In the following, the words should not be spaced out any more than normal.</P>
<P class=test>These words are not separated by comments. They <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> should <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> be <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> spaced <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> out <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> as
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> much <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> as <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> these <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- -->
<!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!-- --> <!--
--> <!-- --> <!-- --> words.</P>
<h2>3. Comment Terminator</h2>
<P>The comment delimiter is <code>--</code>, so the end delimited is
certainly not <code>-&gt</code>. In the following sentence, the word
<q>INCORRECTLY</q> should not appear:</P>
<P class=test>This browser parses comments <!-- ->
INCORRECTLY! Yes, I said in<!- -->correctly.</P>
<P>The markup used was:</P>
<PRE>
&lt;P&gt;This browser parses comments &lt;!-- -&gt; INCORRECTLY!
Yes, I said in&lt;!- --&gt;correctly.&lt;/P&gt;
</PRE>
<P>If you take <code>--</code> to be the comment delimiter, you can
easily see that the words in the middle are actually inside a
comment.</P>
<h2>Submit Results</h2>
<FORM action="/%7Epy8ieh/cgi/newresult.pl" method="POST" class="resultsubmission">
<P>How does your browser fare on this test?
<SELECT NAME="result">
<OPTION VALUE="Y"> The three tests are correctly parsed. </OPTION>
<OPTION VALUE="B"> Some of the tests are incorrectly parsed. </OPTION>
<OPTION VALUE="D"> Large parts of the document are missing. </OPTION>
</SELECT>
<LABEL>Comment: <INPUT TYPE="text" NAME="comment"></LABEL>
<INPUT TYPE="submit" VALUE="Submit">
</P>
</FORM>
<HR title="Footer">
<p><a href="home.html">Up to the Evil Tests Page</A>.</p>
<P>Bugzilla: <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=2749">Bug 2749</A> (parsing errors - reported fixed, awaiting strict DTD mode to verify) ; <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=3304">Bug 3304</A> (page does not display)</P>
<p>This page is maintained by <a class=External HREF="http://www.bath.ac.uk/%7Epy8ieh/">Ian Hickson</A> (<a class=Mail HREF="mailto:py8ieh=website@bath.ac.uk">py8ieh@bath.ac.uk</A>).</p>
<p>Last updated in January 1999.</p>
</BODY></HTML>