mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-09 23:57:03 +02:00
Implement HTMLT tests, and migrate HTMLPurifierTest to this format.
HTMLT tests are a compact and easy-to-use way of making assertPurification type tests. They take the format of: --INI-- Ns.Directive = "directive value" --HTML-- Input HTML --EXPECT-- Expected HTML Expect more features and migration to be coming soon. Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
9
tests/HTMLPurifier/HTMLT/safe-object-embed-munge.htmlt
Normal file
9
tests/HTMLPurifier/HTMLT/safe-object-embed-munge.htmlt
Normal file
@@ -0,0 +1,9 @@
|
||||
--INI--
|
||||
HTML.SafeObject = true
|
||||
HTML.SafeEmbed = true
|
||||
URI.Munge = "/redirect.php?url=%s&check=%t"
|
||||
URI.MungeSecretKey = "foo"
|
||||
--HTML--
|
||||
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/Oq3FV_zdyy0&hl=en"></param><embed src="http://www.youtube.com/v/Oq3FV_zdyy0&hl=en" type="application/x-shockwave-flash" width="425" height="344"></embed></object>
|
||||
--EXPECT--
|
||||
<object width="425" height="344" data="http://www.youtube.com/v/Oq3FV_zdyy0&hl=en" type="application/x-shockwave-flash"><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><param name="movie" value="http://www.youtube.com/v/Oq3FV_zdyy0&hl=en" /><embed src="http://www.youtube.com/v/Oq3FV_zdyy0&hl=en" type="application/x-shockwave-flash" width="425" height="344" allowscriptaccess="never" allownetworking="internal" /></object>
|
Reference in New Issue
Block a user