diff --git a/libraries/joomla/html/html/email.php b/libraries/joomla/html/html/email.php
index d468705dbf86c..9af2930cc954b 100644
--- a/libraries/joomla/html/html/email.php
+++ b/libraries/joomla/html/html/email.php
@@ -40,66 +40,47 @@ public static function cloak($mail, $mailto = 1, $text = '', $email = 1)
$mail = explode('@', $mail);
$mail_parts = explode('.', $mail[1]);
// Random number
- $rand = rand(1, 100000);
-
- $replacement = "\n ';
+ += "";
+ += "";
- // XHTML compliance no Javascript text handling
- $replacement .= "";
- $replacement .= JText::_('JLIB_HTML_CLOAKING');
- $replacement .= "\n ";
+ if (!$this) {
+ return;
+ }
+
+ $this.set('html','' + + '');
+
+ $this.getElement('a').set('text',);
+
+
+ $this.set('html',);
+
+ });
+
+