Obfuscated email address feature

  • Unknown's avatar

    Hi there! I use the email address obfuscator at http://www.albionresearch.com/misc/obfuscator.php to protect email addresses from harvesting when I need to publish them online. However, the WordPress editor parses the address and then converts it back to the normal code. That means every time I edit a page, I have to save it, go back in, paste in the obfuscated email code, then save it again.

    In my self-hosted blogs I get around this by making a short code that substitutes the obfuscated email address code and the editor leaves it alone.

    Can we get a custom shortcode feature? Or if something that general isn’t acceptable, how about an email address obfuscator? Ideally it would be a option that, when enabled (which it is by default), would obfuscate the email addresses as part of rendering the page. This would REALLY help us keep the spam down yet still make it easy to communicate with our readers.

    Thanks!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there,

    Can you give me a link to a post or page where you’ve used that code, so I can take a closer look at how you’re using it?

    In general, we recommend using a Contact Form for having visitors contact you. The contact form doesn’t reveal your email address, and submissions go through our spam filter to make sure any spam doesn’t reach you.

    I’d recommend using a contact form like that, but I can also take a look at how you’re using that email address obfuscator and pass along your shortcode suggestion to our team.

  • Unknown's avatar

    Hi Rachel,

    One such page is Out Of My Gourd.

    The obfuscator converts a number of characters in the address to HTML entities, both in the link and in the text. When viewed in a browser it is indistinguishable from a normally coded email address. Here is the code for the address on my page (assuming I converted the characters correctly!):

    outofmygourd@t-rob.net

    I realize that a contact form is often helpful but there are many legitimate reasons to post an email address. For example, a friend is a radio talk show host and his guests often wish to post their email addresses and contact info.

    As for general shortcode functions, I use Shortcoder for several things. For instance, I created a shortcode where I give it an ISBN and it generates an Amazon Associate Link, italicizes the book title, and renders as text on the page. A similar one does the same function but renders the product image instead, including properly resizing and aligning it.

    If I could make a pitch for a general-purpose shortcode builder, it would not be to provide these specific functions, but rather that a general-purpose text macro capability would be useful.

  • Unknown's avatar

    OK, it seems I didn’t escape the email address code sufficiently. I had intended to render on the page the actual code. However, if you view the page source, you will see that the address which looks normal on the page is actually a bunch of HTML entities. Let’s see if back ticks capture it correctly:

    <a href='mailto:out%6Ffmy%67o%75r%64%40t-rob.net'>outofmygourd@t-rob.net</a>

    Thanks — T.Rob

  • Unknown's avatar

    OK, what about escapes AND backticks?

    <a href='mailto:out%6Ffmy%67o%75r%64%40t-rob.net'>outofmygourd@t-rob.net</a>

  • Unknown's avatar

    [HEADDESK]
    [HEADDESK]
    [HEADDESK]

    Never mind. Feel free to delete this and the last two since it seems to be impossible to render code as code.

    On the other hand, <span style="font-size: 1.875em;color: #ff0000;">I wonder if this allows me to slip in illegal code…<&sol;span>

  • Unknown's avatar

    Thanks for the link to that page where you used it — and sorry for the frustration trying to post an example here. These forums pretty aggressively interpret HTML entities when you post them here, even within backticks, so it’s easier to look at an example directly on your blog. (Sorry I forgot to mention that earlier!)

    I can’t promise that our developers will implement a way to obfuscate email addresses like this, but I am passing along the idea so they can consider it! :)

  • Unknown's avatar

    Another alternative I’ve seen folks use is to post the email address in an image, rather than as text. That way the email address is still human-readable, but you don’t run into trouble every time you edit the page it’s on.

    I know that’s not as elegant a solution as a shortcode or other obfuscator, but it’s another option you could try out if the current method isn’t working well for you.

  • Unknown's avatar

    Thanks, I appreciate your passing the request along. I realize it is a corner case and the contact form takes care of most needs, but after hosting here for so long, moving to a self-hosted site just to activate a single plugin is a bit of a hardship. Plus, being able to stay here with the upgrades helps fund WordPress which I’m pleased to be able to do.

    (I LOVE the no-ads upgrade. Please continue to offer that. Always.)

    — T.Rob

  • The topic ‘Obfuscated email address feature’ is closed to new replies.