Quantcast
Channel: WordPress.org Forums » [Autoptimize] Support
Viewing all articles
Browse latest Browse all 14052

johnh10 on "[Plugin: Autoptimize] Optimize CSS Code error with background-image elements"

$
0
0

Well, not at that point, since $url is still relative (images/h2.jpg). It's expanded to an absolute a bit further down, so I put the str_replace after the $code at line 487:

$code = str_replace($matches[0][$k],$hash,$code);
$newurl = str_replace(" ","%20",$newurl);

Which also leaves the question: what if someone uses spaces in their absolute url? That should be caught as well. For instance

#left h2,h4{color:#fff;background-image:url(http://www.domain.com/wp-content/themes/surf-20passion/Surf Passion/images/h2.jpg);


Viewing all articles
Browse latest Browse all 14052


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>