blob: 817938b4f42f6fd54a74f0149353a65e967cb222 [file] [log] [blame]
Brian Silverman70325d62015-09-20 17:00:43 -04001<html>
2<?state state=text, tag=html ?>
3
4 <head>
5 <?state state=text, tag=head ?>
6 <!-- Title element with markup -->
7 <title>
8 <?state state=text, tag=title ?>
9 <h1>
10 <?state state=text, tag=title ?>
11 </h1>
12 <!--
13 <?state state=text, tag=title ?>
14 </title>
15 <?state state=text, tag=title ?>
16 -->
17 <?state state=text, tag=title ?>
18 </title>
19 <?state state=text ?>
20
21 <!-- Style element with attributes -->
22 <style a=b>
23 <b><?state state=text, tag=style, in_js=false, in_css=true?></b>
24 </style>
25 <?state in_css=false?>
26 </head>
27<body>
28<?state state=text, in_js=false ?>
29 <!-- PCDATA nested block -->
30 <b>
31 <?state state=text, tag=b ?>
32 <i>
33 <?state state=text, tag=i ?>
34 </i>
35 <?state state=text ?>
36 </b>
37 <?state state=text ?>
38
39 <!-- Textarea element with space at the end of the closing tag -->
40 <textarea>
41 <?state state=text, tag=textarea ?>
42 <b>
43 <?state state=text, tag=textarea ?>
44 <i>
45 <?state state=text, tag=textarea, in_css=false ?>
46 <!--
47 <?state state=text, tag=textarea ?>
48 </textarea>
49 <?state state=text, tag=textarea ?>
50 -->
51 </i>
52 <?state state=text, tag=textarea ?>
53 </b>
54 <?state state=text, tag=textarea ?>
55 </textarea >
56
57<?state state=text ?>
58
59 <!-- script tag with other tags inside -->
60 <script>
61 document.write("
62 <?state in_js=true, js_quoted=true, tag=script ?>
63 <style>
64 .none { display:none }
65 </style>
66 <?state in_js=true, js_quoted=true ?>
67 ");
68 <?state in_js=true, js_quoted=false ?>
69 </script>
70
71 <?state in_js=false ?>
72
73 <!-- script tag with a backslash quoted script tag -->
74 <script>
75 <?state in_js=true, js_quoted=false ?>
76 document.body.innerHTML = '<script><\/script>'
77 <?state in_js=true, js_quoted=false ?>
78 </script>
79
80 <?state in_js=false ?>
81
82 <!-- </script> appearing between javascript comments -->
83 <script>
84 <!--
85 <?state in_js=true, js_quoted=false ?>
86 document.body.innerHTML = '<script></script>'
87 <?state in_js=true, js_quoted=false ?>
88 -->
89 </script>
90
91 <?state in_js=false ?>
92
93 <!-- Closing script with an extra space at the end of the tag. Some browsers
94 ignore this tag and some browsers honour it. We honour it. -->
95 <script>
96 <?state in_js=true, js_quoted=false ?>
97 document.body.innerHTML = '<script><\/script>'
98 <?state in_js=true, js_quoted=false ?>
99 </script >
100
101 <script>
102 <?state in_js=true, js_quoted=false ?>
103 </script%>
104 <?state in_js=true, js_quoted=false ?>
105 </script >
106
107 <?state in_js=false ?>
108
109</body>
110<?state in_js=false ?>
111</html>
112