htmLawed_TESTCASE.txt 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. /*
  2. htmLawed_TESTCASE.txt, 19 January 2015
  3. htmLawed 1.1.19, 19 January 2015
  4. Copyright Santosh Patnaik
  5. Dual licensed with LGPL 3 and GPL 2+
  6. A PHP Labware internal utility - http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed
  7. */
  8. This file has UTF-8-encoded text with both correct and incorrect/malformed HTML/XHTML code snippets to test htmLawed (test cases/samples). The entire text may also be used as a unit.
  9. ************************************************
  10. when viewing this file in a web browser, set the
  11. character encoding to Unicode/UTF-8
  12. ************************************************
  13. --------------------- start --------------------
  14. <em>Try different $config and $spec values. Some text even when filtered in will not be displayed in a rendered web-page</em><br />
  15. <h6>Attributes</h6>
  16. <strong>Xml:lang:</strong><a lang="en" xml:lang="en"></a>, <a lang="en"></a>, <a xml:lang="en"></a><br />
  17. <strong>Standard, predefined value, or empty attribute:</strong> <input type="text" disabled />, <input type="text" disabled="DISABLED" />, <input type="text" disabled="1" /><br />
  18. <strong>Required:</strong> <img />, <img alt="image" /><br />
  19. <strong>Quote & space variation:</strong> <a id=id1 name=xy>a</a>, <a id='id2' name="xy">a</a>, <a id=' id3 ' name = "n" >a</a><br />
  20. <strong>Invalid:</strong> <a id="id4" src="s">a</a><br />
  21. <strong>Duplicated:</strong> <a id="id5" id="id6">a</a><br />
  22. <strong>Deprecated:</strong> <a id="id7" target="self" name="n">a</a>, <hr noshade="noshade" /><br />
  23. <strong>Casing:</strong> <a HREF=""></a><br />
  24. <strong>Custom:</strong> <img alt="image" my:data="portrait" /><br />
  25. <strong>Data-*:</strong> <a data-xml="x" data-xmnt="x" data-xmlnt="x" data-xmn:t="x" data-xmxm="x">a</a><br />
  26. <strong>Admin-restricted?:</strong> <a href="x" onclick="alert();"></a>
  27. <h6>Attribute values</h6>
  28. <strong>Duplicate ID value:</strong><a id="id8"></a>, <a id="my_id8"></a>, <a id="id8"></a><br />
  29. (try 'my_' for prefix)<br />
  30. <strong>Double-quotes in value:</strong><a title=ab"c"></a>, <a title="ab"c"></a>, <a title='ab"c'></a><br />
  31. (try filter for CSS expression)<br />
  32. <strong>CSS expression</strong>: <div style="prop:expression();"></div><div style="prop:expression()"></div><div style="prop: expression();"></div><div style="prop : expression()"></div><div style="prop:expression(js);"></div><div style="prop:expression(js;)"></div><div style="prop: expression('js');"></div><div style="prop : expr ession('js':)"></div><div style="prop&#x3a;expression( 'js&#x40; );"></div><br />
  33. <strong>Other:</strong> <input size="50" class="my" value="an input an input an input" />, <input size="5" class="your" value="an input" /><br />
  34. (try 'maxlen', 'maxval', etc., for 'input' in '$spec')
  35. <h6>Blockquotes</h6>
  36. <blockquote>abc</blockquote><br />
  37. <blockquote>abc<div>def</div></blockquote><br />
  38. <blockquote><div>abc</div>def</blockquote><br />
  39. <blockquote>abc<div>def</div>ghi</blockquote><br />
  40. abc<div>def</div>ghi<br />
  41. <blockquote>QQQ<div>x</div><!-- comment --></blockquote><br />
  42. <blockquote><div>x</div><!-- comment -->QQQ</blockquote><br />
  43. <blockquote><!-- comment --><div>x</div>QQQ<div>x</div></blockquote><br />
  44. <blockquote><div>x<!-- comment --></div>QQQ</blockquote><p>x</p><br />
  45. <br />
  46. (try with blockquote parent)
  47. <h6>CDATA sections</h6>
  48. <strong>Special characters inside:</strong> <![CDATA[ ]]> ]]>, <![CDATA[ 3 < 4 > 3.5, & 4 &gt; 4 ]]><br />
  49. <strong>Normal:</strong> <![CDATA[ check ]]>, <em>CDATA follows:<![CDATA[ check ]]></em><br />
  50. <strong>Malformed:</strong> <![cdata check ]]>, < ![CDATA check ]]>, <![CDATA check ]]>, < ![CDATA check ] ]><br />
  51. <strong>Invalid:</strong> <em <![CDATA[ check ]]>>CDATA in tag content</em>, <table><![CDATA[ check ]]><tr><td>text not allowed</td></tr></table>
  52. <h6>Complex-1: deprecated elements</h6>
  53. <center>
  54. The PHP <s>software</s> script used for this <strike>web-page</strike> webpage is <font style="font-weight: bold " face=arial size='+3' color = "red ">htmLawedTest.php</font>, from <u style= 'color:green'>PHP Labware</u>.
  55. </center>
  56. <h6>Complex-2: deprecated attributes</h6>
  57. <img src="s" alt="a" name="n" /><img src="s" alt="a" id="id9" name="n" />
  58. <br clear="left" />
  59. <hr noshade size="1" />
  60. <img name="id10" src="s" align="left" alt="image" hspace="10" vspace="10" width="10em" height="20" border="1" style="padding:5px;" />
  61. <table width="50em" align="center" bgcolor="red">
  62. <tr>
  63. <td width="20%">
  64. <div align="center">
  65. <h3 align="right">Section</h3>
  66. <p align="right">Para</p>
  67. <ol type="a" start="e"><li value="x"><a name="x">First</a> <a name="x" id="id11">item</a></li></ol>
  68. </div>
  69. </td>
  70. <td width="*">
  71. <ol type="1"><li>First item</li></ol>
  72. </td>
  73. </tr>
  74. </table>
  75. <br clear="all" />
  76. <h6>Complex-3: embed, object, area</h6>
  77. <object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/ls7gi1VwdIQ"></param><embed src="http://www.youtube.com/v/ls7gi1VwdIQ" type="application/x-shockwave-flash" width="425" height="350"></embed></object><br />
  78. <embed src="http://www.youtube.com/v/ls7gi1VwdIQ" type="application/x-shockwave-flash" width="425" height="350"></embed><br />
  79. <object data="1.gif" type="image/gif" usemap="#map1"><map name="map1">
  80. <p>navigate the site: <a href="1" shape="REct" coOrds="0,0,118,28">1</a> | <a href="3" shape="circle" coords="184,200,60">3</a> | <a href="4" shape="poly" coords="276,0,276,28,100,200,50,50,276,0">4</a></p>
  81. <area href="5" shape="Rect" coords="0,0,118,28">
  82. </map></object>
  83. <param name="name">value</param>
  84. <object id="obj1">
  85. <param name="param1">
  86. <object id="obj2">
  87. <param name="param2">
  88. </object>
  89. </object>
  90. <h6>Complex-4: nested and other tables</h6>
  91. <table border="1" bgcolor="red"> <tr> <td> Cell </td> <td colspan="2" rowspan="2"> <table border="1" bgcolor="green"> <tr> <td> Cell </td> <td colspan="2" rowspan="2"> </td> </tr> <tr> <td> Cell </td> </tr> <tr> <td> Cell </td> <td> Cell </td> <td> Cell </td> </tr> </table> </td> </tr> <tr> <td> Cell </td> </tr> <tr> <td> Cell </td> <td> Cell </td> <td> Cell </td> </tr> </table><br />
  92. <strong>PCDATA wrong:</strong> <table>Well<caption>Hello</caption></table><br />
  93. <strong>Missing tr:</strong> <table><td>Well</td></table><br />
  94. <h6>Complex-5: pseudo, disallowed or non-HTML tags</h6>
  95. (Try different 'keep_bad' values)
  96. <*> Pseudotags <*>
  97. <xml>Non-HTML tag xml</xml>
  98. <p>
  99. Disallowed tag p
  100. </p>
  101. <ul>Bad<li>OK</li></ul>
  102. <h6>Elements</h6>
  103. <strong>Unbalanced:</strong> <a href="h"><em>check</a></em><br />
  104. <strong>Non-XHTML:</strong> <div><center><dir></dir></center></div><br />
  105. <strong>Malformed:</strong> < a href=""></a>, <a href="" ></a>, <a href="" ></a>, <a href=""
  106. ></a>, <a href="">< /a>, < a href=""></a >, <img src="s" alt="a" />, <img src="s" alt="a"/ >, <imgsrc="s" alt="a" /><br />
  107. <strong>Invalid:</strong> <image src="s" alt="a" /><br />
  108. <strong>Empty:</strong> <img src="s" alt="a" />, <img src="s" alt="a"></img>, <img src="s" alt="a">text</img><br />
  109. <strong>Content invalid:</strong> <a href="h">1<a>2</a></a><br />
  110. <strong>Content invalid?:</strong> <form></form><br /> (try setting 'form' as parent)<br />
  111. <strong>Casing:</strong> <A href=""></a><br />
  112. <strong>Check for tidy:</strong> <br /><hr /></div><hr /></div><hr /></div><div>hi</div>
  113. <h6>Entities</h6>
  114. <strong>Special:</strong> &amp; 3 < 2 & 5>4 and j >i >a & i<j>a<br />
  115. <strong>Padding:</strong> &#00066; &#066; &#x00066; &#x066; &#x003; &#0003;<br />
  116. <strong>Malformed:</strong> & #x27;, &x27;, &#x27; &TILDE;, &tilde<br />
  117. <strong>Invalid:</strong> &#x3;, &#55296;, &#03;, &#1114112;, &#xffff, &bad;<br />
  118. <strong>Discouraged characters:</strong> &#x7f;, &#132;, &#64992;, &#1114110;<br />
  119. <strong>Context:</strong> '&gt;', &lt;?<br />
  120. <strong>Casing:</strong> &#X27;, &#x27;, &TILDE;, &tilde;
  121. <br />
  122. (also check named-to-numeric and hexdec-to-decimal, and vice versa, conversions)
  123. <h6>Format</h6>
  124. <strong>Valid but ill-formatted:</strong> text <!-- comment -->
  125. text <!--
  126. A c o m m e n t -->
  127. <script>
  128. <![CDATA[
  129. code
  130. ]]>
  131. </script><!-- comment --><![CDATA[ cdata ]]> <a>text</b> text<pre id="none">p r e</pre>
  132. <textarea>text</textarea> <textarea>
  133. text text
  134. </textarea> text text <br /><hr />
  135. text <img src="none" alt="none" /> t<em class="none">e<strong>x</strong>t</em>
  136. text <img src="none" alt="none" /> <b>t<em> e <strong> x </strong> t</em></b>
  137. <a href="a"> text <img src="none" alt="none" /> <b>t <em> e <strong> x </strong> t</em></b>
  138. </a>
  139. <span style="background-color: yellow;">text <img src="none" alt="none" /> <b> <em> t e <strong> x </strong> t</em></b></span>
  140. <script>script</script>
  141. <div>
  142. <pre id="none">p <a>r</a> e <!-- comment --> </pre>
  143. <pre>
  144. pre
  145. </pre>
  146. </div>
  147. <div><div><table border="1" style="background-color: red;"><tr><td>Cell</td><td colspan="2" rowspan="2"><table border="1" style="background-color: green;"><tr><td>Cell</td><td colspan="2" rowspan="2"></td></tr><tr><td>Cell</td></tr><tr><td>Cell</td><td>Cell</td><td>Cell</td></tr></table></td></tr><tr><td>Cell</td></tr><tr><td>Cell</td><td>Cell</td><td>Cell</td></tr></table></div></div>
  148. (try to compact or beautify)
  149. <h6>Forms</h6>
  150. (note nesting of 'form', missing required attributes, etc.)<br />
  151. <form>
  152. <script type="text/javascript">s</script>
  153. <fieldset><legend>p</legend>l <input name="personal_lastname" type="text" tabindex="1"></fieldset>
  154. <input name="h" type="checkbox" value="h" tabindex="20"> h
  155. <textarea name="t">t</textarea>
  156. <form action="a" method="get"></form></form><br />
  157. <form action="b" method="get"><p><input type="text" value="i" /></form><br />
  158. <form>B:<input type="text" value="b" />C:<input type="text" value="c" /></form><br />
  159. (try each of these lines separately)<br />
  160. <form action="a">what<br />
  161. <form action="a">what
  162. (try with container as div and as form)<br />
  163. <form>c <a>a</a> <b>b</b><input /><script>s</script>
  164. <h6>HTML comments (also CDATA)</h6>
  165. <strong>Script inside:</strong> <!--[if gte IE 4]>
  166. <SCRIPT>alert('XSS');</SCRIPT>
  167. <![endif]--><br />
  168. <strong>Special characters inside: <!-- <![CDATA check ]]> -->, <!-- 3 < 4 > 3.5, & 4 &gt; 4 -->, <!-- che--ck -->, <!--[if !IE]> <--><a>c</a><!--> <![endif]--><br />
  169. <strong>Normal:</strong> <!-- check -->, <!--check -->, <em>comment:<!-- check --></em><!-- check -->, <table><!-- check --><tr><td>text not allowed</td></tr></table><br />
  170. <strong>Malformed:</strong> <![cdata check ]]>, < ![CDATA check ]]>, < ![CDATA check ] ]><br />
  171. Invalid:</strong> <em <!-- check -->>comment in tag content</em>, <!--check-->
  172. <h6>HTML5</h6>
  173. <strong>figure and figcaption:</strong> <figure><img src="picture.jpg" alt="picture"><figcaption>Caption for the awesome picture</figcaption></figure>
  174. <strong>article:</strong> <h1>A</h1><p>B</p><article><h2>C</h2></article><article><h2>E</h2><p>F</p><p>G</p></article>
  175. <strong>meter</strong>: <p>Heat <meter min="100" max="200" value="150">150</meter>.</p>
  176. <strong>datalist</strong>: <input list="b" /><datalist id="b"><option value="c"><option value="d"></datalist>
  177. <h6>Ins-Del</h6>
  178. (depending on context, these elements can be of either block or inline type)<br />
  179. <p><ins datetime="d" cite="c"><div>block</div></ins></p><br />
  180. <p><del>d</del></p><br />
  181. <p><ins><del>d</del></ins></p><div><ins><p><del><div>d</div></del></p></ins></div><ins><div>d</div></ins>
  182. <h6>Lists</h6>
  183. <strong>Invalid character data</strong>: <ul><li>(item</li>)</ul><br />
  184. <strong>Definition list</strong>: <dl><dt>a</dt>bad<dd>first <em>one</em></dd><dt>b</dt><dd>second</dd></dl><br />
  185. <strong>Definition list, close-tags omitted</strong>: <dl><dt>a</dt>bad<dd>first <em>one</em></dd><dt>b<dd>second</dl><br />
  186. <strong>Definition lists, nested</strong>: <dl>
  187. <dt>T1</dt>
  188. <dd>D1</dd>
  189. <dt>T2</dt>
  190. <dd>D2<dl><dt>t1</dt><dd>d1</dd><dt>t2</dt><dd>d2</dd></dl></dd>
  191. <dt>T3</dt>
  192. <dd>D3</dd>
  193. <dt>T4</dt>
  194. <dd>D4<dl><dt>t1</dt><dd>d1</dd></dl></dd>
  195. </dl><br />
  196. <strong>Definition lists, nested, close-tags omitted</strong>: <dl>
  197. <dt>T1
  198. <dd>D1</dd>
  199. <dt>T2</dt>
  200. <dd>D2<dl><dt>t1<dd>d1<dt>t2</dt><dd>d2</dd></dl></dd>
  201. <dt>T3
  202. <dd>D3
  203. <dt>T4
  204. <dd>D4<dl><dt>t1<dd>d1</dl></dd>
  205. </dl><br />
  206. <strong>Nested</strong>: <ul>
  207. <li>l1</li>
  208. <li>l2<ol><li>lo1</li><li>lo2</li></ol></li>
  209. <li>l3</li>
  210. <li>l4<ol><li>lo3</li><li>lo4<ol><li>lo5</li></ol></li></ol></li>
  211. </ul><br />
  212. <strong>Nested, directly</strong>: <ul>
  213. <li>l1</li>
  214. <ol>l2</ol>
  215. <li>l3</li>
  216. </ul><br />
  217. <strong>Nested, close-tags omitted</strong>: <ul>
  218. <li>l1</li>
  219. <li>l2<ol><li>lo1<li>lo2</ol>
  220. <li>l3
  221. <li>l4<ol><li>lo3<li>lo4<ol><li>lo5</ol></ol>
  222. </ul><br />
  223. <strong>Complex</strong>:
  224. <ol><script></script><li><table><tr><td>
  225. <ul><li id="search" class="widget widget_search"> <form id="searchform" method="get" action="http://kohei.us">
  226. <div>
  227. <input type="text" name="s" id="s" size="15" /><br />
  228. <input type="submit" value="Search" />
  229. </div>
  230. </form>
  231. </li></ul>
  232. </td></tr></table></li></ol>
  233. <strong>Menu</strong>: <menu type="toolbar"><li><menu label="File">
  234. <button type="button" onclick="new()">New...</button>
  235. </menu></li><li><menu label="Edit"><button type="button" onclick="cut()">Cut...</button></menu></li>
  236. </menu>
  237. <h6>Microdata</h6>
  238. <div itemscope itemtype="http://data-vocabulary.org/Person">
  239. I am <span itemprop="name">X</span> but people call me <span itemprop="nickname">Y</span>.
  240. Find me at <a href="http://www.xy.com" itemprop="url">www.xy.com</a>
  241. </div>
  242. <h6>Microsoft Word</h6>
  243. <strong>Proprietary tag</strong>: <p class=3DMsoNormal><o:p>&nbsp;</o:p></p><br />
  244. <strong>XML declaration</strong>: <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><br />
  245. <strong>XML-invalid character code-point (may not replicate)</strong>: <p class=3DMsoNormal>“Where is he?” asked both Mary – the one so lovely – and Jane.</p>
  246. <h6>Nesting</h6>
  247. <strong>Block or inline a</strong>: <p><a href="link">text</a></p><a href="link"><div>hi</div></a><br />
  248. <h6>Non-English text-1</h6>
  249. Inscrieţi-vă acum la a Zecea Conferinţă Internaţională<br />
  250. გთხოვთ ახლავე გაიაროთ რეგისტრაცია<br />
  251. večjezično računalništvo<br />
  252. <a title="อ.อ่าง">อ.อ่าง</a><br />
  253. <a title="הירשמו
  254. כעת לכנס ">Зарегистрируйтесь сейчас
  255. на Десятую Международную Конференцию по</a><br />
  256. (this file should have utf-8 encoding; some characters may not be displayed because of missing fonts, etc.)
  257. <h6>Non-English text-2: entities</h6>
  258. &#29992;&#32479;&#19968;&#30721;<br />
  259. &#4306;&#4311;&#4334;&#4317;&#4309;&#4311;<br />
  260. Inscreva-se agora para a D&#233;cima Confer&#234;ncia Internacional Sobre O Unicode, realizada entre os dias 10 e 12 de mar&#231;o de 1997 em Mainz
  261. na Alemanha.
  262. <h6>Ruby</h6>
  263. (need compatible browser)<br />
  264. <ruby xml:lang="ja">
  265. <rbc>
  266. <rb>斎</rb>
  267. <rb>藤</rb>
  268. <rb>信</rb>
  269. <rb>男</rb>
  270. </rbc>
  271. <rtc class="reading">
  272. <rt>さい</rt>
  273. <rt>とう</rt>
  274. <rt>のぶ</rt>
  275. <rt>お</rt>
  276. </rtc>
  277. <rtc class="annotation">
  278. <rt rbspan="4" xml:lang="en">W3C Associate Chairman</rt>
  279. </rtc>
  280. </ruby><br />
  281. <ruby>
  282. <rb>WWW</rb>
  283. <rp>(</rp><rt>World Wide Web</rt><rp>)</rp>
  284. </ruby><br />
  285. <ruby>
  286. A
  287. <rp>(</rp><rt>aaa</rt><rp>)</rp>
  288. </ruby>
  289. <h6>Tables</h6>
  290. <strong>Omitted closing tags:</strong> <table>
  291. <colgroup><col style="x" /><col style="y" />
  292. <thead>
  293. <tr><th>h1c1<th>h1c2
  294. <tbody>
  295. <tr><td>r1c1<td>r1c2
  296. <tr><td>r2c1<td>r2c2
  297. </table><br />
  298. <strong>Nested, omitted closing tags:</strong> <table>
  299. <colgroup><col style="x" /><col style="y" />
  300. <thead>
  301. <tr><th>h1c1<th>h1c2
  302. <tbody>
  303. <tr><td>r1c1<td>r1c2<table>
  304. <colgroup><col style="x" /><col style="y" />
  305. <thead>
  306. <tr><th>h1c1<th>h1c2
  307. <tbody>
  308. <tr><td>r1c1<td>r1c2
  309. <tr><td>r2c1<td>r2c2
  310. </table>
  311. <tr><td>r2c1<td>r2c2
  312. </table><br />
  313. <h6>Tag transformation</h6>
  314. <strong>Font element intended as 'inline' element:</strong> <p><font color='red'>hi</font></p><br />
  315. <strong>Font element intended as 'block' element:</strong> <div><font color='red'><div>hi</div></font></div><br />
  316. <strong>Font element intended as 'block' element:</strong> <center><font color='red'><div>hi</div><div>QQQ</div></font></center><br />
  317. <h6>Tidy</h6>
  318. <strong>White-space handling:</strong> abc<em> def </em> ghi abc <em>def</em> ghi
  319. <h6>URLs</h6>
  320. <strong>Relative and absolute:</strong> <a href="mailto:x"></a>, <a href="http://a.com/b/c/d.f"></a>, <a href="./../d.f"></a>, <a href="./d.f"></a>, <a href="d.f"></a>, <a href="#s"></a>, <a href="./../../d.f#s"></a><br />
  321. (try base URL value of 'http://a.com/b/')<br />
  322. <strong>CSS URLs:</strong> <div style="background-image: url('a.gif');"></div>, <div style="background-image: URL(&quot;a.gif&quot;);"></div>, <div style="background-image: url('http://a.com/a.gif');"></div>, <div style="background-image: url('./../a.gif');"></div>, <div style="background-image: &#117;r&#x6C;('js&#58;xss'&#x29;"></div><br />
  323. <strong>Double URLs:</strong> <a style="behaviour: url(foo) url(http://example.com/xss.htc)">b</a><br />
  324. <strong>Anti-spam:</strong> (try regex for 'http://a.com', etc.) <a href="mailto:x@y.com"></a>, <a href="http://a.com/b@d.f"></a>, <a href="a.com/d.f" rel="nofollow"></a>, <a href="a.com/d.f" rel="1, 2"></a>, <a href="a.com/d.f"></a>, <a href="b.com/d.f"></a>, <a href="c.com/d.f">, <a href="denied:http://c.com/d.f"></a><br />
  325. <strong>Soft-hyphen:</strong> <a href="http://q=ídis­c">ídis­c</a>
  326. <h6>XSS</h6>
  327. <img alt="<img onmouseover=confirm(1)//"<"">
  328. '';!--"<xss>=&{()}<br />
  329. <img src="javascript%3Aalert('xss');" /><br />
  330. <img src="javascript:alert('xss');" /><br />
  331. <img src="java script:alert('xss');" /><br />
  332. <img
  333. src=&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116;&#40;&#39;&#88;&#83;&#83;&#39;&#41; /><br />
  334. <div style="javascript:alert('xss');"></div><br />
  335. <div style="background-image:url(javascript:alert('xss'));"></div><br />
  336. <div style="background-image:url(&quot;javascript:alert('xss')&quot; );"></div><br />
  337. <!--[if gte IE 4]><script>alert('xss');</script><![endif]--><br />
  338. <script a=">" src="http://ha.ckers.org/xss.js"></script><br />
  339. <div style="background-image: &#117;r&#x6C;('js&#58;xss'&#x29;"></div><br />
  340. <a style=";-moz-binding:url(http://lukasz.pilorz.net/xss/xss.xml#xss)" href="http://example.com">test</a><br />
  341. <strong>Bad IE7:</strong> <a href="http://x&x=%22+style%3d%22background-image%3a+expression%28alert
  342. %28%27xss%3f%29%29">x</a><br />
  343. <strong>Opera:</strong> <a href="\xE2\x80\x83javascript:alert(123)">link</a>
  344. <strong>Bad IE7:</strong> <a style=color:expr/*comment*/ession(alert(document.domain))>xxx</a><br />
  345. <strong>Bad IE7:</strong> <a href="xxx" style="background: exp&#x72;ession(alert('xss'));">xxx</a><br />
  346. <strong>Bad IE7:</strong> <a href="xxx" style="background: &#101;xpression(alert('xss'));">xxx</a><br />
  347. <strong>Bad IE7:</strong> <a href="xxx" style="background: %45xpression(alert('xss'));">xxx</a><br />
  348. <strong>Bad IE7:</strong> <a href="xxx" style="background:/**/expression(alert('xss'));">xxx</a><br />
  349. <strong>Bad IE7:</strong> <a href="xxx" style="background:/**/&#69;xpression(alert('xss'));">xxx</a><br />
  350. <strong>Bad IE7:</strong> <a href="xxx" style="background:/**/Exp&#x72;ession(alert('xss'));">xxx</a><br />
  351. <strong>Bad IE7:</strong> <a href="xxx" style="background: expr%45ssion(alert('xss'));">xxx</a><br />
  352. <strong>Bad IE7:</strong> <a href="xxx" style="background: exp/* */ression(alert('xss'));">xxx</a><br />
  353. <strong>Bad IE7:</strong> <a href="xxx" style="background: exp /* */ression(alert('xss'));">xxx</a><br />
  354. <strong>Bad IE7:</strong> <a href="xxx" style="background: exp/ * * /ression(alert('xss'));">xxx</a><br />
  355. <strong>Bad IE7:</strong> <a href="xxx" style="background:/* x */expression(alert('xss'));">xxx</a><br />
  356. <strong>Bad IE7:</strong> <a href="xxx" style="background:/* */ */expression(alert('xss'));">xxx</a><br />
  357. <strong>Bad IE7:</strong> <a href="x" style="width: /****/**;;;;;;*/expression/**/(alert('xss'));">x</a><br />
  358. <strong>Bad IE7:</strong> <a href="x" style="padding:10px; background:/**/expression(alert('xss'));">x</a><br />
  359. <strong>Bad IE7:</strong> <a href="x" style="background: huh /* */ */expression(alert('xss'));">x</a><br />
  360. <strong>Bad IE7:</strong> <a href="x" style="background:/**/expression(alert('xss'));background:/**/expression(alert('xss'));">x</a><br />
  361. <strong>Bad IE7:</strong> exp/*<a style='no\xss:noxss("*//*");xss:&#101;x&#x2F;*XSS*//*/*/pression(alert("XSS"))'>x</a><br />
  362. <strong>Bad IE7:</strong> <a style="background:&#69;xpre\ssion(alert('xss'));">hi</a><br />
  363. <strong>Bad IE7:</strong> <a style="background:expre&#x5c;ssion(alert('xss'));">hi</a><br />
  364. <strong>Bad IE7:</strong> <a style="color: \0065 \0078 \0070 \0072 \0065 \0073 \0073 \0069 \006f \006e \0028 \0061 \006c \0065 \0072 \0074 \0028 \0031 \0029 \0029">test</a><br />
  365. <strong>Bad IE7:</strong> <a style="xss:e&#92;&#48;&#48;&#55;&#56;pression(window.x?0:(alert(/XSS/),window.x=1));">hi</a><br />
  366. <strong>Bad IE7:</strong> <a style="background:url('java
  367. script:eval(document.all.mycode.expr)')">hi</a><br />
  368. <h6>Other</h6>
  369. 3 < 4 <br />
  370. 3 > 4 <br />
  371. > 3 <br />
  372. <._.> hi! <br />
  373. <<< ALERT >>> <br />
  374. <![if !vml]> some stuff <![endif]> <br />
  375. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> <br />
  376. <uml:ns ns = "urn:www"> <br />
  377. <uml:ns ns = 'urn:www'> <br />
  378. if(13<age AND 21>age){say 'teen'} <br />
  379. age >51 and a smoking history of >51 pack-years <b>was</b> <br />
  380. age > 51 and a smoking history of >51 pack-years <b>was</b> <br />
  381. age <51 and a smoking history of <51 pack-years <b>was</b> <br />
  382. age < 51 and a smoking history of < 51 pack-years <b>was</b> <br />
  383. <b>age >51 and a smoking history of >51 pack-years</b> <br />
  384. <b>age > 51 and a smoking history of >51 pack-years</b> <br />
  385. <b>age <51 and a smoking history of <51 pack-years</b> <br />
  386. <b>age < 51 and a smoking history of < 51 pack-years</b> <br />