Hi Mike
On Jan 23, 9:39 am, Mike Branski <[EMAIL PROTECTED]> wrote:
> This jQuery plugin turns an obfuscated e-mail address into a human-
> readable one. It's lightweight and accepts multiple filtering levels
> for additional security.
Thanks for the plugin. Works great for me!
I did run into a problem with email addresses that have more than one
dot (period) in them. For example, my/name/my/domain/com gets
rendered as [EMAIL PROTECTED] when it should be
[EMAIL PROTECTED]
I made a small change in the encoding convention by using a double
slash (//) to represent the @. Single slashes (/) represent the
dots. So my example is now encoded as my/name//my/domain/com.
Another thing that I noticed is if there are several single slashes in
the obfuscated email address, only the first one gets substituted with
a dot because the replace() function is not executing globally.
So to put this together, I changed the common code sequence:
.replace('/', '@').replace('/', '.')
to:
.replace('//', '@').replace(/\//g, '.')
This replaces the singly occurring double slash with an @, then
replaces all single slashes with a dot.
Cheers,
Bill
I