Project

General

Profile

Actions

Bug #79572

open

Fix relative URL Path in CSS may fail if svg data inside url()

Added by René Rossi over 7 years ago. Updated 9 months ago.

Status:
Accepted
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2017-01-31
Due date:
% Done:

0%

Estimated time:
1.00 h
TYPO3 Version:
11
PHP Version:
Tags:
compressor, data,
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

Hi,

if there is some SVG Date inside of an background the regexp in line 631 on ResourceCompressor.php seems to fail.

So if there are some thing like:

background-image:url("data:image/svg+xml;charset=utf8,%3Csvg
width='396' height='348' viewBox='0 0 396 348'
xmlns='http://www.w3.org/2000/svg'
xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Csvg
id='application_avi' data-name='Layer 1' viewBox='0 0 48 48'
width='48' height='48' x='348'
y='144'%3E%3Cdefs%3E%3Cstyle%3E.aacls-1%7Bfill:none%7D.aacls-2%7Bclip-path:url('%23aaclip-path')%7D.aacls-3%7Bfill:%23f6f6f6%7D.aacls-4%7Bfill:%23e0e0e0%7D.aacls-5%7Bclip-path:url('%23aaclip-path-2')%7D.aacls-6%7Bfill:%234c8fc3%7D.aacls-7%7Bclip-path:url('%23aaclip-path-3')");

the regular expression only returns the inner urls and prepends them.
compare here http://www.phpliveregex.com/p/iLr

i think something like this should work better here: http://www.phpliveregex.com/p/iMl


Files

test.css (393 Bytes) test.css Riccardo De Contardi, 2018-07-21 21:46
Actions

Also available in: Atom PDF