[
"Don't barf at behavior: url(#default#behaviorName) - T162973",
[ 'foo { behavior: url(#default#bar); }', false, '/w/', false ],
- 'foo { behavior: url(\'#default#bar\'); }',
+ 'foo { behavior: url("#default#bar"); }',
],
];
}
// data: URIs for red.gif, green.gif, circle.svg
$red = 'data:image/gif;base64,R0lGODlhAQABAIAAAP8AADAAACwAAAAAAQABAAACAkQBADs=';
$green = 'data:image/gif;base64,R0lGODlhAQABAIAAAACAADAAACwAAAAAAQABAAACAkQBADs=';
- $svg = 'data:image/svg+xml,%3C%3Fxml version="1.0" encoding="UTF-8"%3F%3E '
- . '%3Csvg xmlns="http://www.w3.org/2000/svg" width="8" height='
- . '"8"%3E %3Ccircle cx="4" cy="4" r="2"/%3E %3C/svg%3E';
+ $svg = 'data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%228'
+ . '%22 height=%228%22 viewBox=%220 0 8 8%22%3E %3Ccircle cx=%224%22 cy=%224%22 '
+ . 'r=%222%22/%3E %3Ca xmlns:xlink=%22http://www.w3.org/1999/xlink%22 xlink:title='
+ . '%22%3F%3E%22%3Etest%3C/a%3E %3C/svg%3E';
- // @codingStandardsIgnoreStart Generic.Files.LineLength
+ // phpcs:disable Generic.Files.LineLength
return [
[
'Regular file',
[
'SVG files are embedded without base64 encoding and unnecessary IE 6 and 7 fallback',
'foo { /* @embed */ background: url(circle.svg); }',
- "foo { background: url('$svg'); }",
+ "foo { background: url(\"$svg\"); }",
],
[
'Two regular files in one rule',
[
'Background URL (containing parentheses; T60473)',
'foo { background: url("//localhost/styles.css?query=(parens)") }',
- 'foo { background: url(\'//localhost/styles.css?query=(parens)\') }',
+ 'foo { background: url("//localhost/styles.css?query=(parens)") }',
],
[
'Background URL (double quoted, containing single quotes; T60473)',
'foo { background: url("//localhost/styles.css?quote=\'") }',
- 'foo { background: url(\'//localhost/styles.css?quote=\\\'\') }',
+ 'foo { background: url("//localhost/styles.css?quote=\'") }',
],
[
'Background URL (single quoted, containing double quotes; T60473)',
'foo { background: url(\'//localhost/styles.css?quote="\') }',
- 'foo { background: url(\'//localhost/styles.css?quote="\') }',
+ 'foo { background: url("//localhost/styles.css?quote=\"") }',
],
[
'Simple case with comments before url',
'.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(http://localhost/w/images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; }',
],
];
- // @codingStandardsIgnoreEnd
+ // phpcs:enable
}
/**
'url(data:image/png;base64,R0lGODlh/+==)',
],
[
- 'URL with single quotes',
+ 'URL with quotes',
"https://en.wikipedia.org/wiki/Wendy's",
- "url('https://en.wikipedia.org/wiki/Wendy\\'s')",
- ],
- [
- 'URL with double quotes',
- 'https://en.wikipedia.org/wiki/""',
- "url('https://en.wikipedia.org/wiki/\"\"')",
+ "url(\"https://en.wikipedia.org/wiki/Wendy's\")",
],
[
'URL with parentheses',
'https://en.wikipedia.org/wiki/Boston_(band)',
- "url('https://en.wikipedia.org/wiki/Boston_(band)')",
+ 'url("https://en.wikipedia.org/wiki/Boston_(band)")',
],
- [
- 'URL with spaces',
- 'https://en.wikipedia.org/wiki/Foo bar',
- "url('https://en.wikipedia.org/wiki/Foo bar')"
- ]
];
}