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);