aboutsummaryrefslogtreecommitdiffstats
path: root/lib/htmlpurifier/tests/HTMLPurifier/HTMLT/munge.htmlt
blob: 827c216e6341c2ae4bfcabb97acd58e8d577296f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--INI--
URI.Munge = "/r/%s"
URI.AllowedSchemes = http,ftp,file
--HTML--
<a href="google.com">foo</a>
<a href="/google.com">foo</a>
<a href="//google.com">foo</a>
<a href="///google.com">foo</a>
<a href="////google.com">foo</a>

<a href="http:google.com">foo</a>
<a href="http:/google.com">foo</a>
<a href="http://google.com">foo</a>
<a href="http:///google.com">foo</a>
<a href="http:////google.com">foo</a>

<a href="ftp:google.com">foo</a>
<a href="ftp:/google.com">foo</a>
<a href="ftp://google.com">foo</a>
<a href="ftp:///google.com">foo</a>
<a href="ftp:////google.com">foo</a>

<a href="file:google.com">foo</a>
<a href="file:/google.com">foo</a>
<a href="file://google.com">foo</a>
<a href="file:///google.com">foo</a>
<a href="file:////google.com">foo</a>
--EXPECT--
<a href="google.com">foo</a>
<a href="/google.com">foo</a>
<a href="/r/%2F%2Fgoogle.com">foo</a>
<a href="/google.com">foo</a>
<a>foo</a>

<a href="google.com">foo</a>
<a href="/google.com">foo</a>
<a href="/r/http%3A%2F%2Fgoogle.com">foo</a>
<a href="/google.com">foo</a>
<a>foo</a>

<a>foo</a>
<a>foo</a>
<a href="/r/ftp%3A%2F%2Fgoogle.com">foo</a>
<a>foo</a>
<a>foo</a>

<a href="file:google.com">foo</a>
<a href="file:/google.com">foo</a>
<a href="file://google.com">foo</a>
<a href="file:///google.com">foo</a>
<a href="file:////google.com">foo</a>
--# vim: et sw=4 sts=4