?
avatar irbian
irbian
25 Jun 2013

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

return '<img src="' . $file . '" alt="' . $alt . '" ' .

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.

avatar irbian irbian - open - 25 Jun 2013
avatar tristanhall
tristanhall - comment - 29 Jun 2013

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".

avatar tristanhall tristanhall - reference | - 29 Jun 13
avatar brianteeman
brianteeman - comment - 13 Oct 2013

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

avatar brianteeman brianteeman - close - 13 Oct 2013
avatar zero-24 zero-24 - close - 13 Oct 2013
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?
Removed: ? ?
Build staging

Add a Comment

Login with GitHub to post a comment