{emailcloak=off} not absorbed when no email address(es)

Locked
winuser
Joomla! Intern
Joomla! Intern
Posts: 99
Joined: Fri Aug 18, 2006 9:57 am

{emailcloak=off} not absorbed when no email address(es)

Post by winuser » Sun Aug 05, 2007 3:15 pm

The {emailcloak=off} tag is left behind as literal page content if the page does not present any email addresses. Of course, all Joomla! tags should be absorbed by their handlers (in this case, presumably the email cloaking mambot).

Thanks,

-sd
Science • Education • Programming

jaystarkey
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Wed Feb 08, 2006 7:14 am

Re: {emailcloak=off} not absorbed when no email address(es)

Post by jaystarkey » Fri Aug 17, 2007 6:12 pm

I was having a problem getting it shut off, but realized that I was using the "mos" prefix at the beginning.  Thanks anyhow.
Last edited by jaystarkey on Fri Aug 17, 2007 6:16 pm, edited 1 time in total.

lmcbmai
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Sep 25, 2007 6:36 pm

Re: {emailcloak=off} not absorbed when no email address(es)

Post by lmcbmai » Sat Oct 27, 2007 4:01 am

I got the same problem and had to hack mosemailcloak.php to fix it.

The solution is easy: move the lines

// simple check to allow disabling of bot
$regex = '{emailcloak=off}';
if ( strpos( $row->text, $regex ) !== false ) {
$row->text = str_replace( $regex, '', $row->text );
return true;
}

right above
               
  // simple performance check to determine whether bot should process further
if ( strpos( $row->text, '@' ) === false ) {
return true;
}

These are lines 30 to 40 of the source code.

Regards,
//Boris


Locked

Return to “Joomla! 1.0.x_Q&T”