CSS clip-path: url(#…) gets processed to absolute path
-
Hi there!
I love your plugin and am very glad to be able to use it.
Recently I discovered that the CSS inline function processes clip-path-URLs that point to a SVG with an anchor link to absolute urls. So
clip-path: url(#some-svg);
becomes
clip-path: url(https://mysite.net/#some.svg);
Which will be useless in most cases.
I would propose to change the regex in fastvelocity_min_get_css() in functions.php to not match urls that start with #:
$css = preg_replace("/url\(\s*['\"]?(?!data:)(?!http)(?![\/'\"#])(.+?)['\"]?\s*\)/ui", "url(".dirname($url)."/$1)", $css);
That fixed it for me.
Cheers,
Phil
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘CSS clip-path: url(#…) gets processed to absolute path’ is closed to new replies.