Removing Spaces from Relative Paths
PermalinkDoes anyone know how I can remove these spaces, without resorting to str_replace(" ","%20",$var)
Is there a better call then getRelativePath();
or do I need to edit the function?
/var/www/vhosts/siteulr.co.uk/httpdocs/files/imageurl.jpg
Which breaks the zoom_image block.
Using getPath() also still outputs the space.
I have got round it by using
$fileName = str_replace(" ","%20",$fo->getRelativePath());
I did attempt to alter the function getRelativePath but must be doing it in the wrong place as it will not return the corrected URL.
I'll don't know if it can be justified as a bug as it only breaks the validation at W3c the browser will still interprets it as an image and displays it.
getPath() instead