gecko-dev/parser/htmlparser/tests/html/quote001.html

52 строки
2.4 KiB
HTML

<html>
<head>
<title>HTML test for quoted string
</title>
</head>
<body>
This was created on 9/12/97, for Xena bug # 85121
<br>Testing the quoted value string.
<br> tag A is used so you can check the string by moving mouse on the link.
<br> use view source or text editor to compare with browser display.
<br> The goal is to be compatible with Navigator 4.0
<br> Test results are compared with Nav4.0 display. Relavent Nav4.0 source
files are ns\lib\libparse\pa_parse.c and others.
<br> Differences between 4.0 and xena are indecated. Search for XENA60
to find all the defferences.
<br><br> comments from ns\xena\lego\src\lego\html\scanner\HTMLScanner.java:
<br>// For quoted value string :
<br>// Double/single quote only take effect as the first char
<br>// of the value string,
<br>// Quoted string is terminated by the second double/single quote
<br>// respectively.
<br>// In other places, double/single quote is treated literally.
<br>// Entity & quot; is always treated literally, enven it is the
<br>// first char.
<br>//
<br>// Unquoted value string is terminated by while space, or '>' sign.
<br><br>
Test lines:
<br>10(quote / quote ) good syntax: <a href="abcd"> both quotes striped from string</a>
<br>20( / )<a href= abcd > value not quoted, not recommented, but still good syntax.</a>
<br>30<a href="123456789123456789223456789323456789423456789523456789623456789723456789823456789923456789">
Navigator 4.0 value string trunketed at 82 characters</a> XENA60 limit is MAX_STRING_LENGTH = 2000.
<br>40 The following are illegal HTML, but handled by Nav4.0 in different ways.
<br>50( / )<a href= abcd xyz > string not quoted, whight space terminates the value</a>
<br>60( / )<a href= abcd
xyz > string not quoted, CR terminates the string</a>
<br>70(escaped-quote / quote ) <a href=&quot;abcd" > both quotes remain in string </a>
<br>80(quote / ) <a href="abcd > no closing quote, Add a quote in text to protect next test line">
move mouse on this. If we didn't have a quote in the text, the value string would
run through the end of the A tag.</a>
<br>90(quote / escaped-quote ) <a href="abcd&quot;> still in quote">same as above, escaped quote does NOT terminate quote </a>
<br>100( / quote)<a href=abcd"> if no opening quote, quotes are included in string</a>
<br>110( / quote)<a href=abcd"xyz> no opening quote, value terminated at right brack </a>
</body>
</html>