Ignore external resources in CssLinkResourceTransormer

Prior to this commit, the CssLinkResourceTransformer would transform
"external resources", i.e. resources not served by the web application.

This commit only allows transformation for resources which path don't
contain scheme such as "file://" or "http://". Only relative and
absolute paths for resources served by the webapp are valid.

Issue: SPR-11860
This commit is contained in:
Brian Clozel
2014-06-12 10:54:41 +02:00
parent e18e44980d
commit 72baa9bf27
5 changed files with 82 additions and 5 deletions

View File

@@ -0,0 +1,2 @@
@import url("http://example.org/fonts/css");
body { background: url("file:///home/spring/image.png") }

View File

@@ -7,5 +7,3 @@
@import 'foo.css';
body { background: url("images/image.png") }
li { list-style: url(http://www.example.com/redball.png) disc }