item_description_crazy.xml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <!--
  2. Description: item description 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. <title>Crazy RSS</title>
  8. <description>Contains unsafe script</description>
  9. <link>http://crazy.example.com/</link>
  10. <language>en</language>
  11. <item>
  12. <description>
  13. &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  14. &lt;html xmlns="http://www.w3.org/1999/xhtml">
  15. &lt;head>
  16. &lt;title>Crazy HTML -- Can Your Regex Parse This?&lt;/title>
  17. &lt;/head>
  18. &lt;body notRealAttribute="value"onload="executeMe();"foo="bar"
  19. >
  20. &lt;!-- &lt;script> -->
  21. &lt;!--
  22. &lt;script>
  23. -->
  24. &lt;/script>
  25. &lt;script
  26. >
  27. function executeMe()
  28. {
  29. /* &lt;script>
  30. function am_i_javascript()
  31. {
  32. var str = "Some innocuously commented out stuff";
  33. }
  34. &lt; /script>
  35. */
  36. alert("Executed");
  37. }
  38. &lt;/script
  39. >
  40. &lt;h1>Did The Javascript Execute?&lt;/h1>
  41. &lt;div notRealAttribute="value
  42. "onmouseover="
  43. executeMe();
  44. "foo="bar">
  45. I will execute here, too, if you mouse over me
  46. &lt;/div>
  47. &lt;/body>
  48. &lt;/html>
  49. </description>
  50. </item>
  51. </channel>
  52. </rss>