From 7a40f4354b32809af3d0cfd6e3af0eda02ab0e0a Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 12 May 2012 17:57:41 -0700 Subject: some important stuff we'll need --- lib/htmlpurifier/smoketests/attrTransform.php | 72 +++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 lib/htmlpurifier/smoketests/attrTransform.php (limited to 'lib/htmlpurifier/smoketests/attrTransform.php') diff --git a/lib/htmlpurifier/smoketests/attrTransform.php b/lib/htmlpurifier/smoketests/attrTransform.php new file mode 100644 index 000000000..2dfda7f4a --- /dev/null +++ b/lib/htmlpurifier/smoketests/attrTransform.php @@ -0,0 +1,72 @@ + + + + HTML Purifier Attribute Transformation Smoketest + + + + +

HTML Purifier Attribute Transformation Smoketest

+
+
+ HTML +
+
+ CSS +
+
+Requires PHP 5.

'); + +$xml = simplexml_load_file('attrTransform.xml'); + +// attr transform enabled HTML Purifier +$config = HTMLPurifier_Config::createDefault(); +$config->set('HTML.Doctype', 'XHTML 1.0 Strict'); +$purifier = new HTMLPurifier($config); + +$title = isset($_GET['title']) ? $_GET['title'] : true; + +foreach ($xml->group as $group) { + echo '

' . $group['title'] . '

'; + foreach ($group->sample as $sample) { + $sample = (string) $sample; +?> +
+
+ +
+
+ purify($sample); ?> +
+
+ + + +