function CtoolsCssTestCase::testCssFilterURLHandling
Test that in case that url is used, the colons survives filtering.
File
-
tests/
css.test, line 79
Class
- CtoolsCssTestCase
- Test menu links depending on user permissions.
Code
public function testCssFilterURLHandling() {
$css = "#some-id {\n background-image: url(http://example.com/example.gif);\n}";
$css_data = ctools_css_disassemble($css);
$empty_array = array();
$disallowed_values_regex = '/(expression)/';
$intermediate = ctools_css_filter_css_data($css_data, $empty_array, $empty_array, '', $disallowed_values_regex);
$filtered = ctools_css_assemble($intermediate);
$url = strpos($filtered, 'http://example.com/example.gif') !== FALSE;
$this->assertTrue($url, 'CSS with multiple colons can survive.');
}