Merge "resourceloader: Fix malformed "https:/w/resources" mapping in CSSMin"
This commit is contained in:
commit
9cb47787fb
2 changed files with 14 additions and 0 deletions
|
|
@ -436,6 +436,7 @@ class CSSMin {
|
|||
$ret->setScheme( false );
|
||||
}
|
||||
if ( $isServerless ) {
|
||||
$ret->setScheme( false );
|
||||
$ret->setHost( false );
|
||||
}
|
||||
return $ret->getURL();
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ class CSSMinTest extends MediaWikiIntegrationTestCase {
|
|||
return [
|
||||
[ 'url("//example.org")', [] ],
|
||||
[ 'url("https://example.org")', [] ],
|
||||
[ 'url("//example.org/x")', [] ],
|
||||
[ 'url("http://example.org/x")', [] ],
|
||||
[ 'url("https://example.org/x")', [] ],
|
||||
[ 'url("#default#")', [] ],
|
||||
[ 'url("WikiFont-Glyphs.svg#wikiglyph")', [ '/WikiFont-Glyphs.svg' ] ],
|
||||
[ 'url("#some-anchor")', [] ],
|
||||
|
|
@ -296,6 +299,16 @@ class CSSMinTest extends MediaWikiIntegrationTestCase {
|
|||
[ 'foo { prop: url(../bar.png); }', false, 'http://example.org/quux/mid/', false ],
|
||||
'foo { prop: url(http://example.org/quux/bar.png); }',
|
||||
],
|
||||
[
|
||||
'Server-less path (T268308)',
|
||||
[ 'foo { prop: url(../bar.png); }', false, '/quux/mid/', false ],
|
||||
'foo { prop: url(/quux/bar.png); }',
|
||||
],
|
||||
[
|
||||
'Protocol-relative URL',
|
||||
[ 'foo { prop: url(../bar.png); }', false, '//example.org/quux/mid/', false ],
|
||||
'foo { prop: url(//example.org/quux/bar.png); }',
|
||||
],
|
||||
[
|
||||
'Guard against stripping double slashes from query',
|
||||
[ 'foo { prop: url(bar.png?corge=//grault); }', false, 'http://example.org/quux/', false ],
|
||||
|
|
|
|||
Loading…
Reference in a new issue