English > General Questions
w3c validation
(1/1)
Finarfin:
Error:
<a href='http://localhost/index.php/fr/news?view=article&id=836' target='_self' class='lang fr-FR'>
Possible solution:
Mod_lenguage/helper.php, line 211:
return array($link, $menuitem->title);
becomes
return array(htmlspecialchars($link), $menuitem->title);
Harald Leithner:
Wrong way, or better wrong position.
But it should already be escaped with htmlspecialchars...
in mod_jdlanguage/tmpl/default.php
we have a row with
--- Code: ---<a href='<?php echo JRoute::_($language->link); ?>' target='_self'...
--- End code ---
And JRoute::_() is escaping with htmlspecialchars... did you use the default.php as template?
Finarfin:
Really strange.
- Default.php
<a href='<?php echo JRoute::_($language->link); ?>' target='_self' class='lang <?php echo $language->lang_code; ?><?php echo ($language->active ? ' active' : ''); ?>'
With htmlspecialchars on helper.php
<a href='http://localhost/index.php/en/news?view=article&id=836' target='_self' class='lang en-GB'
><img src="/media/com_jdiction/images/flags/en.png" alt="English (UK) - News"></a>
- Without
<a href='http://localhost/index.php/en/news?view=article&id=836' target='_self' class='lang en-GB'
><img src="/media/com_jdiction/images/flags/en.png" alt="English (UK) - News"></a>
Joomla 2.5.8
Its really a small detail to worry too much, but is kind of strange
Ok, I think I get it, here (http://api.joomla.org/Joomla-Platform/JRoute.html) says: "boolean $xhtml: Replace & by & for XML compilance" but... the default behaviour is to xhmtl= true. Even forcing it, jroute stills don´t behave properly.... really strange. Ok, I explain the "problem" here (https://github.com/joomla/joomla-cms/issues/1270), when you have "&" and "index.php" on your url, it doesn´t htmlentity, don´t know if is a mistake or a design decision.
I´ll let you know
Navigation
[0] Message Index
Go to full version