Skip to content

Commit

Permalink
Backport: email cloaking does not work with & in text to 2.5.x
Browse files Browse the repository at this point in the history
Please see the orginal issue for 3.x (#4263) and the PR (#4273)

The same issue is in 2.5.x and the same fix work good for me.

Sinze the code is not from me i mark the first successful test.
  • Loading branch information
zero-24 committed Sep 12, 2014
1 parent e02ce00 commit 16c8175
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/joomla/html/html/email.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,17 @@ public static function cloak($mail, $mailto = true, $text = '', $email = true)
*/
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;
}
}

0 comments on commit 16c8175

Please sign in to comment.