diff --git a/NEWS b/NEWS
index f01b4f67..db4cfcb3 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
1.2.0, unknown projected release date
! Added MODx plugin
! Added percent encoding normalization
+! XSS attacks smoketest given facelift
- Documentation updated
+ TODO added request Phalanger
+ TODO added request Native compression
diff --git a/smoketests/xssAttacks.php b/smoketests/xssAttacks.php
index 48d020a1..4fdace29 100644
--- a/smoketests/xssAttacks.php
+++ b/smoketests/xssAttacks.php
@@ -2,6 +2,19 @@
require_once('common.php');
+function formatCode($string) {
+ return
+ str_replace(
+ array("\t", '»', '\0(null)'),
+ array('\t', '»', '\0'),
+ escapeHTML(
+ str_replace("\0", '\0(null)',
+ wordwrap($string, 28, " »\n", true)
+ )
+ )
+ );
+}
+
?>
@@ -9,15 +22,26 @@ require_once('common.php');
HTMLPurifier XSS Attacks Smoketest
+
HTMLPurifier XSS Attacks Smoketest
XSS attacks are from
http://ha.ckers.org/xss.html.
-The last segment of tests regarding blacklisted websites is not
+
Caveats:
+The last segment of tests regarding blacklisted websites is not
applicable at the moment, but when we add that functionality they'll be
-relevant.
-Most of the XSS broadcasts its presence by spawning an alert dialogue.
+relevant. Most XSS broadcasts its presence by spawning an alert dialogue.
+The displayed code is not strictly correct, as linebreaks have been forced for
+readability. Linewraps have been marked with ». Some tests are
+omitted for your convenience. Not all control characters are displayed.
+
Test
-
-