entry_summary_crazy.xml 1.3 KB

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