Skip to content

Commit

Permalink
[#4179] - email cloaking does not work with special char
Browse files Browse the repository at this point in the history
  • Loading branch information
infograf768 committed Aug 26, 2014
1 parent da459eb commit 99e3cbf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/content/emailcloak/emailcloak.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ protected function _cloak(&$text, &$params)
while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
{
$mail = $regs[2][0];
$mailText = $regs[4][0] . $regs[5][0] . $regs[6][0];
$mailText = $regs[4][0] . addslashes($regs[5][0]) . $regs[6][0];

$replacement = JHtml::_('email.cloak', $mail, $mode, $mailText, 0);

Expand All @@ -251,7 +251,7 @@ protected function _cloak(&$text, &$params)
while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
{
$mail = $regs[2][0];
$mailText = $regs[4][0];
$mailText = addslashes($regs[4][0]);

$replacement = JHtml::_('email.cloak', $mail, $mode, $mailText, 0);

Expand Down Expand Up @@ -311,7 +311,7 @@ protected function _cloak(&$text, &$params)
while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
{
$mail = $regs[2][0];
$mailText = $regs[4][0] . ($regs[5][0]);
$mailText = $regs[4][0] . addslashes($regs[5][0]);

$replacement = JHtml::_('email.cloak', $mail, $mode, $mailText, 0);

Expand Down Expand Up @@ -355,7 +355,7 @@ protected function _cloak(&$text, &$params)
while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
{
$mail = $regs[2][0] . $regs[3][0];
$mailText = $regs[5][0];
$mailText = addslashes($regs[5][0]);

// Needed for handling of Body parameter
$mail = str_replace('&', '&', $mail);
Expand Down Expand Up @@ -399,7 +399,7 @@ protected function _cloak(&$text, &$params)
while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
{
$mail = $regs[2][0] . $regs[3][0];
$mailText = $regs[4][0] . $regs[5][0] . $regs[6][0] . $regs[7][0];
$mailText = $regs[4][0] . $regs[5][0] . addslashes($regs[6][0]) . $regs[7][0];

$replacement = JHtml::_('email.cloak', $mail, $mode, $mailText, 0);

Expand Down Expand Up @@ -467,7 +467,7 @@ protected function _cloak(&$text, &$params)
while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
{
$mail = $regs[1][0] . $regs[2][0] . $regs[3][0];
$mailText = $regs[4][0] . $regs[5][0] . $regs[6][0];
$mailText = $regs[4][0] . $regs[5][0] . addslashes($regs[6][0]);

// Needed for handling of Body parameter
$mail = str_replace('&', '&', $mail);
Expand Down

0 comments on commit 99e3cbf

Please sign in to comment.