diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-05-14 19:24:01 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-05-14 19:24:01 +0200 |
commit | 918a4468877109c2ba2f82fa4e1a225a4738ed9a (patch) | |
tree | fac9b3bb89faf60895913960499faa727eab3e20 /_test | |
parent | cfb2335aca014812dc45fc4dc5a4289456e66e4c (diff) | |
download | rpg-918a4468877109c2ba2f82fa4e1a225a4738ed9a.tar.gz rpg-918a4468877109c2ba2f82fa4e1a225a4738ed9a.tar.bz2 |
don't treat double slashes as comments when used in string
This avoids treating double slashes as single line comments in CSS when
they are used in a filter or content string.
closes #638
Diffstat (limited to '_test')
-rw-r--r-- | _test/tests/lib/exe/css_css_compress.test.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/_test/tests/lib/exe/css_css_compress.test.php b/_test/tests/lib/exe/css_css_compress.test.php index 4769684a8..807317ca6 100644 --- a/_test/tests/lib/exe/css_css_compress.test.php +++ b/_test/tests/lib/exe/css_css_compress.test.php @@ -60,6 +60,14 @@ class css_css_compress_test extends DokuWikiTest { $this->assertEquals('#foo{background-image:url(//foo.bar/baz.jpg);}', css_compress($text)); } + function test_slcom7(){ + $text = '#foo a[href ^="https://"], #foo a[href ^=\'https://\'] { + background-image: url(//foo.bar/baz.jpg); // background-image: url(http://foo.bar/baz.jpg); this is \'all\' "commented" + }'; + $this->assertEquals('#foo a[href ^="https://"],#foo a[href ^=\'https://\']{background-image:url(//foo.bar/baz.jpg);}', css_compress($text)); + } + + function test_hack(){ $text = '/* Mac IE will not see this and continue with inline-block */ /* \\*/ |