'+addy_text" . $rand . "+'<\/a>';"; } else { $tmpScript = "document.getElementById('cloak" . $rand . "').innerHTML += '' +addy" . $rand . "+'<\/a>';"; } } else { $tmpScript = "document.getElementById('cloak" . $rand . "').innerHTML += addy" . $rand . ";"; } $script = " document.getElementById('cloak" . $rand . "').innerHTML = ''; var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy" . $rand . " = '" . @$mail[0] . "' + '@'; addy" . $rand . " = addy" . $rand . " + '" . implode("' + '.' + '", $mail_parts) . "'; $tmpScript "; // TODO: Use inline script for now $inlineScript = ""; return '' . JText::_('JLIB_HTML_CLOAKING') . '' . $inlineScript; } /** * Convert encoded text * * @param string $text Text to convert * * @return string The converted text. * * @since 1.5 */ protected static function convertEncoding($text) { $text = html_entity_decode($text); // Replace vowels with character encoding $text = str_replace('a', 'a', $text); $text = str_replace('e', 'e', $text); $text = str_replace('i', 'i', $text); $text = str_replace('o', 'o', $text); $text = str_replace('u', 'u', $text); $text = htmlentities($text, ENT_QUOTES, 'UTF-8', false); return $text; } }