Obfuscating Emails Revisited
Since it has given me much joy to once again be able to write plain email addresses in my pages (without worrying about spam harvesters) I figured I should share :) But do double-check that the result you get from the filter is actually what you expect — the parser used is written for (my) valid HTML pages with potential script tags (such as
<% … %> and
<?php … ?>).
By replacing the full document node with a
<script> … </script>-construct it should keep the resulting page as well-formed. Though the filter inserts a
<noscript>-tag is a block-level tag, so this will generally make the page non-valid. If you want a validating page then you can remove the
<noscript> stuff at line 119.
I have pondered a few ways to keep the page as valid and still insert a
<noscript>-tag, but I think the best approach would be to instead have the
<noscript>-tag). Ideally the fallback content should be a human-decodable version of the email address.
If anyone ports the filter to PHP please let me know, as I would love to turn it into a WordPress plug-in.