Hidden text for 'no Javascript'

The support for Joomla 2.5 ended on December 31, 2014. Possible bugs in Joomla 2.5 will not be patched anymore. This forum has been closed. Please update your website to Joomla 3.x

Moderator: ooffick

Forum rules
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Feb 17, 2012 5:11 pm

Hidden text for 'no Javascript'

Postby xgenfr » Fri Feb 17, 2012 5:52 pm


The method used with text between 2 document.write is bad, and causes warnings in Firefox, or errors.

This code :

Code: Select all

      // XHTML compliance `No Javascript` text handling
      $replacement    .= "<span id= 'addy$rand' style='display: inline;'>";
      $replacement    .= JText::_('CLOAKING');
      $replacement    .= "</span>";
      $replacement    .= "\n <script language='JavaScript' type='text/javascript'>";
      $replacement    .= "\n <!--";
      $replacement    .= "\n var el=document.getElementById('addy$rand');";
      $replacement    .= "\n el.style.display='none';";
      $replacement    .= "\n //-->";
      $replacement    .= "\n </script>";

produce the same hidden text, and is accepted by all syntax checkers.

Return to “Joomla! 2.5 Bug Reporting”

Who is online

Users browsing this forum: No registered users and 4 guests