item_fullitem_crazy.xml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!--
  2. Description: item fullitem is crazy
  3. Expect: not bozo and entries[0]['description'] == u'Crazy HTML -' + u'- Can Your Regex Parse This?\n\n\n\n<!-' + u'- <script> -' + u'->\n\n<!-' + u'- \n\t<script> \n-' + u'->\n\n\n\nfunction executeMe()\n{\n\n\n\n\n/* \n<h1>Did The Javascript Execute?</h1>\n<div>\nI will execute here, too, if you mouse over me\n</div>'
  4. -->
  5. <rss version="2.0">
  6. <channel>
  7. <item>
  8. <fullitem>
  9. &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  10. &lt;html xmlns="http://www.w3.org/1999/xhtml">
  11. &lt;head>
  12. &lt;title>Crazy HTML -- Can Your Regex Parse This?&lt;/title>
  13. &lt;/head>
  14. &lt;body notRealAttribute="value"onload="executeMe();"foo="bar"
  15. >
  16. &lt;!-- &lt;script> -->
  17. &lt;!--
  18. &lt;script>
  19. -->
  20. &lt;/script>
  21. &lt;script
  22. >
  23. function executeMe()
  24. {
  25. /* &lt;script>
  26. function am_i_javascript()
  27. {
  28. var str = "Some innocuously commented out stuff";
  29. }
  30. &lt; /script>
  31. */
  32. alert("Executed");
  33. }
  34. &lt;/script
  35. >
  36. &lt;h1>Did The Javascript Execute?&lt;/h1>
  37. &lt;div notRealAttribute="value
  38. "onmouseover="
  39. executeMe();
  40. "foo="bar">
  41. I will execute here, too, if you mouse over me
  42. &lt;/div>
  43. &lt;/body>
  44. &lt;/html>
  45. </fullitem>
  46. </item>
  47. </channel>
  48. </rss>