Ok, maybe I´m being to picky about the w3c validation but I´ll ask anyway.
It seems to me that if you do something like
JHtml::_('image','folder/picture with spaces.jpg")
The generated html won´t be w3c valid. I tried at first to change on
joomla-cms/libraries/cms/html/html.php
Line 582 in 4c78b06
the $file with urlencode and rawurlencode, but as they change also the "/" character, it didn´t seem to work. So... I used a str_replace(" ","%20",$file) and... it validate. I feel dirty and maybe I´m complicating too much, but I would llike to know what do you people think about.
Thanks for reporting this. At this time we are only using github as the place to submit code fixes so I am closing the report here. The actual reporting of issues and testing fixes is still taking place on Joomlacode.
As it has been some time since you opened this issue can you please confirm that it is still valid with the current Master or Joomla 3.2 beta.
If it is still valid please can you open an item on the Joomlacode tracker in the appropriate area.
CMS Bug Reports: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8103
CMS Feature Requests: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8549
Labels |
Added:
?
Removed: ? ? |
||
Build | ⇒ | staging |
I agree, this should be fixed to maintain validity. I would use strstr($file,array(' '=>'%20')) instead of str_replace(...). I read on http://stackoverflow.com/questions/9240556/using-php-replace-spaces-in-urls-with-20 that strstr() has better performance "when replacing multiple characters".