3 class HTMLPurifier_AttrDef_CSS_URITest
extends HTMLPurifier_AttrDefHarness
8 $this->def
= new HTMLPurifier_AttrDef_CSS_URI();
10 $this->assertDef('', false);
12 // we could be nice but we won't be
13 $this->assertDef('http://www.example.com/', false);
15 // no quotes are used, since that's the most widely supported
17 $this->assertDef('url(', false);
18 $this->assertDef('url(\'\')', true);
19 $result = "url('http://www.example.com/')";
20 $this->assertDef('url(http://www.example.com/)', $result);
21 $this->assertDef('url("http://www.example.com/")', $result);
22 $this->assertDef("url('http://www.example.com/')", $result);
24 ' url( "http://www.example.com/" ) ', $result);
27 $this->assertDef("url(http://www.example.com/foo,bar\))",
28 "url('http://www.example.com/foo\,bar\)')");