We should not rewrite URLs such as about:config etc.
* Fixed issue [#448](https://github.com/jakubpawlowicz/clean-css/issues/448) - rebasing no protocol URIs.
* Fixed issue [#517](https://github.com/jakubpawlowicz/clean-css/issues/517) - turning off color optimizations.
* Fixed issue [#542](https://github.com/jakubpawlowicz/clean-css/issues/542) - space after closing brace in IE.
+* Fixed issue [#574](https://github.com/jakubpawlowicz/clean-css/issues/574) - rewriting internal URLs.
[3.2.10 / 2015-05-14](https://github.com/jakubpawlowicz/clean-css/compare/v3.2.9...v3.2.10)
==================
return uri.indexOf('__ESCAPED_URL_CLEAN_CSS__') === 0;
}
+function isInternal(uri) {
+ return /^\w+:\w+/.test(uri);
+}
+
function isRemote(uri) {
return uri.indexOf('http://') === 0 || uri.indexOf('https://') === 0 || uri.indexOf('//') === 0;
}
}
function rebase(uri, options) {
- if (isAbsolute(uri) || isSVGMarker(uri) || isEscaped(uri))
+ if (isAbsolute(uri) || isSVGMarker(uri) || isEscaped(uri) || isInternal(uri))
return uri;
if (options.rebase === false && !isImport(uri))
],
'document-local reference': [
'svg{marker-end:url(#arrow)}', 'svg{marker-end:url(#arrow)}'
+ ],
+ 'internal page': [
+ 'a{background:url(about:blank)}',
+ 'a{background:url(about:blank)}'
]
}, {
root: process.cwd(),