[ 
https://issues.apache.org/jira/browse/TAP5-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17897041#comment-17897041
 ] 

Hudson commented on TAP5-2791:
------------------------------

SUCCESS: Integrated in Jenkins build Tapestry ยป tapestry-trunk-freestyle #278 
(See 
[https://ci-builds.apache.org/job/Tapestry/job/tapestry-trunk-freestyle/278/])
TAP5-2791: Fixing CssCompressor SVG data url handling (ben: rev 
47a6e746fd3a344fa088dbf676aaa8e75c467174)
* (edit) 
tapestry-webresources/src/main/java/org/apache/tapestry5/internal/webresources/CssCompressor.java
* (add) 
tapestry-webresources/src/test/resources/t5/webresources/css/TAP5-2791.css
* (edit) 
tapestry-webresources/src/test/groovy/t5/webresources/tests/CssCompressorSpec.groovy
* (add) 
tapestry-webresources/src/test/resources/t5/webresources/css/TAP5-2791.css.min


> CssCompressor for CSS files produces wrong minification for url() function, 
> at least with data URLs
> ---------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-2791
>                 URL: https://issues.apache.org/jira/browse/TAP5-2791
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-webresources
>    Affects Versions: 5.8.0, 5.8.7
>            Reporter: Hendrik Noot
>            Assignee: Ben Weidig
>            Priority: Major
>
> This problem is closely related to TAP5-2753 and caused by the optimisation 
> (yuicompressor update) from TAP5-2708.
> The CssCompressor removes white spaces from url() functions inside CSS files. 
> So for example if you use a SVG as an backround image something like 
> 'urlheight="1em" viewBox="0 0 576 512"' becomes 
> 'height="1em"viewBox="00576512"' which breaks the SVG.
> There is also an open issue for yuicompressor: 
> [https://github.com/yui/yuicompressor/issues/344]
> The fix inside the CssCompressor is to disable white space removal for the 
> url function, change:
> {code:java}
> css = preserveToken(css, "url", PRESERVE_TOKEN_URL, true, "TOKEN", 
> preservedTokens); {code}
> to:
> {code:java}
> css = preserveToken(css, "url", PRESERVE_TOKEN_URL, false, "TOKEN", 
> preservedTokens);
> {code}
> This works for me and I couldn't find any negative side effects.
> If needed I can provide a pull request.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to