aboutsummaryrefslogtreecommitdiffstats
path: root/lib/htmlpurifier/tests/HTMLPurifier/HTMLT/safe-iframe.htmlt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/htmlpurifier/tests/HTMLPurifier/HTMLT/safe-iframe.htmlt')
-rw-r--r--lib/htmlpurifier/tests/HTMLPurifier/HTMLT/safe-iframe.htmlt14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/htmlpurifier/tests/HTMLPurifier/HTMLT/safe-iframe.htmlt b/lib/htmlpurifier/tests/HTMLPurifier/HTMLT/safe-iframe.htmlt
new file mode 100644
index 000000000..7c0b60d2f
--- /dev/null
+++ b/lib/htmlpurifier/tests/HTMLPurifier/HTMLT/safe-iframe.htmlt
@@ -0,0 +1,14 @@
+--INI--
+HTML.SafeIframe = true
+URI.SafeIframeRegexp = "%(^http://www.example.com/|^https?://dev.example.com/)%"
+--HTML--
+<iframe src="http://www.example.com/"></iframe>
+<iframe src="http://malicious.host.com/?http://www.example.com/"></iframe>
+<iframe src="http://dev.example.com/"></iframe>
+<iframe src="https://dev.example.com/"></iframe>
+--EXPECT--
+<iframe src="http://www.example.com/"></iframe>
+<iframe></iframe>
+<iframe src="http://dev.example.com/"></iframe>
+<iframe src="https://dev.example.com/"></iframe>
+--# vim: et sw=4 sts=4