mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-04 13:18:00 +02:00
Add vim modelines to all files.
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
@@ -5,3 +5,4 @@ HTML.AllowedAttributes = a.href,*.id
|
||||
<p>Par.</p>
|
||||
<p>Para<a href="http://google.com/">gr</a>aph</p>
|
||||
Text<b>Bol<i>d</i></b>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -5,3 +5,4 @@ HTML.AllowedAttributes = a.href,*.id
|
||||
<span>Not allowed</span><a class="mef" id="foobar">Remove id too!</a>
|
||||
--EXPECT--
|
||||
Not allowed<a>Remove id too!</a>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -2,3 +2,4 @@
|
||||
<b>basic</b>
|
||||
--EXPECT--
|
||||
<b>basic</b>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -3,3 +3,4 @@ HTML.ForbiddenElements = b
|
||||
HTML.ForbiddenAttributes = a@href
|
||||
--HTML--
|
||||
<p>foo</p>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -5,3 +5,4 @@ HTML.ForbiddenAttributes = a@href
|
||||
<b>Foo<a href="bar">bar</a></b>
|
||||
--EXPECT--
|
||||
Foo<a>bar</a>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -2,3 +2,4 @@
|
||||
CSS.AllowedProperties = color,background-color
|
||||
--HTML--
|
||||
<div style="color:#f00;background-color:#ded;">red</div>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -4,3 +4,4 @@ CSS.AllowedProperties = color,background-color
|
||||
<div style="color:#f00;border:1px solid #000">red</div>
|
||||
--EXPECT--
|
||||
<div style="color:#f00;">red</div>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -3,3 +3,4 @@ URI.Disable = true
|
||||
--HTML--
|
||||
<img src="foobar" />
|
||||
--EXPECT--
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -3,4 +3,4 @@
|
||||
--HTML--
|
||||
|
||||
--EXPECT--
|
||||
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -2,3 +2,4 @@
|
||||
<span id="moon">foobar</span>
|
||||
--EXPECT--
|
||||
<span>foobar</span>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -3,3 +3,4 @@ Attr.EnableID = true
|
||||
--HTML--
|
||||
<span id="moon">foobar</span>
|
||||
<img id="folly" src="folly.png" alt="Omigosh!" />
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -8,3 +8,4 @@ URI.MungeResources = true
|
||||
--EXPECT--
|
||||
<a href="/redirect?s=http%3A%2F%2Fexample.com&t=c15354f3953dfec262c55b1403067e0d045a3059&r=&n=a&m=href&p=">Link</a>
|
||||
<img src="/redirect?s=http%3A%2F%2Fexample.com&t=c15354f3953dfec262c55b1403067e0d045a3059&r=1&n=img&m=src&p=" style="background-image:url(/redirect?s=http%3A%2F%2Fexample.com&t=c15354f3953dfec262c55b1403067e0d045a3059&r=1&n=img&m=style&p=background-image);" alt="example.com" />
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -3,3 +3,4 @@ Attr.EnableID = true
|
||||
HTML.Doctype = "XHTML 1.0 Strict"
|
||||
--HTML--
|
||||
<a name="asdf"></a>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -7,3 +7,4 @@ URI.MungeSecretKey = "foo"
|
||||
<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>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -5,3 +5,4 @@ HTML.SafeEmbed = true
|
||||
<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>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -6,3 +6,4 @@ HTML.Trusted = true
|
||||
<script type="text/javascript"><!--//--><![CDATA[//><!--
|
||||
alert("<This is compatible with XHTML>");
|
||||
//--><!]]></script>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -8,3 +8,4 @@ alert("<This is compatible with XHTML>");
|
||||
<script type="text/javascript"><!--//--><![CDATA[//><!--
|
||||
alert("<This is compatible with XHTML>");
|
||||
//--><!]]></script>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -8,3 +8,4 @@ alert("<This is compatible with XHTML>");
|
||||
<script type="text/javascript"><!--//--><![CDATA[//><!--
|
||||
alert("<This is compatible with XHTML>");
|
||||
//--><!]]></script>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -8,3 +8,4 @@ alert("<This is compatible with XHTML>");
|
||||
<script type="text/javascript"><!--//--><![CDATA[//><!--
|
||||
alert("<This is compatible with XHTML>");
|
||||
//--><!]]></script>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -8,3 +8,4 @@ alert("<This is compatible with XHTML>");
|
||||
<script type="text/javascript"><!--//--><![CDATA[//><!--
|
||||
alert("<This is compatible with XHTML>");
|
||||
//--><!]]></script>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -7,3 +7,4 @@ URI.MungeSecretKey = "foo"
|
||||
--EXPECT--
|
||||
<a href="/redirect.php?url=http%3A%2F%2Flocalhost&check=8e8223ae8fac24561104180ea549c21fbd111be7">foo</a>
|
||||
<img src="http://localhost" alt="local" />
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -5,3 +5,4 @@ Core.Encoding = "Shift_JIS"
|
||||
Core.EscapeNonASCIICharacters = true
|
||||
--HTML--
|
||||
<b style="font-family:'¥';">111</b>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -6,3 +6,4 @@ Core.Encoding = Shift_JIS
|
||||
<b style="font-family:'¥';">111</b>
|
||||
--EXPECT--
|
||||
<b style="font-family:'';">111</b>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -4,3 +4,4 @@ HTML.Doctype = "XHTML 1.0 Strict"
|
||||
<blockquote>Illegal <b>contents</b></blockquote>
|
||||
--EXPECT--
|
||||
<blockquote><p>Illegal <b>contents</b></p></blockquote>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -4,3 +4,4 @@ HTML.Strict = true
|
||||
<blockquote>Illegal contents</blockquote>
|
||||
--EXPECT--
|
||||
<blockquote><p>Illegal contents</p></blockquote>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -4,3 +4,4 @@ HTML.Strict = true
|
||||
<u>Illegal underline</u>
|
||||
--EXPECT--
|
||||
<span style="text-decoration:underline;">Illegal underline</span>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -2,3 +2,4 @@
|
||||
<table background="logo.png"><tr><td>asdf</td></tr></table>
|
||||
--EXPECT--
|
||||
<table style="background-image:url(logo.png);"><tr><td>asdf</td></tr></table>
|
||||
--# vim: et sw=4 sts=4
|
||||
|
@@ -1,3 +1,3 @@
|
||||
--HTML--
|
||||
Foo<b> </b>bar
|
||||
|
||||
--# vim: et sw=4 sts=4
|
||||
|
Reference in New Issue
Block a user