0

I have an article in Joomla 2.5 that has JavaScript in it. And within the JS I have a text string holding an email:

var my_email = "a@b.com" ;

this string triggers the email cloaking plugin built into Joomla. Of course when I disable the plugin, then there is no problem. But I do not want to disable it, as other parts of the site will benefit from it.

Is there another solution? Apparently there is a PHP class that offers this:

echo JHtml::_('email.cloak', 'demo@example.com'); 

from http://docs.joomla.org

TylerH
  • 20,799
  • 66
  • 75
  • 101
dsdsdsdsd
  • 2,880
  • 6
  • 41
  • 56

1 Answers1

3

You can disable the cloak with in a single article by using this tag {emailcloak=off}

This will only affect the article that you place the tag in — it doesn't matter where the tag goes it disables it for the whole article. (The tag is stripped out at the same time).

Of course this means the address you have in Javascript will be visible to bots.

Craig
  • 9,335
  • 2
  • 34
  • 38
  • offtopic: is there a itemized reference list of joomla 'tags' – dsdsdsdsd Nov 08 '12 at 01:59
  • Sorry not that I'm aware of - good plugins tend to have details of how to use them in the relevant help screens or description. – Craig Nov 08 '12 at 10:49
  • aha ... {emailcloak=off} is a feature of the plugin itself ... and not of joomla, per-se ... got it, thanks. – dsdsdsdsd Nov 08 '12 at 14:46