Little Javascript encoding page

by Jason Haley 14. September 2006 04:09

Here is a simple html page that will take some text and encode it for html using the character codes (&#<charcode>;).  Not sure if it will help in cutting spam down or not, but I put it together so I can put my email address on sites in the excaped version so it is visible in a browser, but is all character entities in plain text.

For example instead of this:

<a href="mailto:jack@somedomain.com">Email me</a>

it will be:

<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#106;&#97;&#107;&#101;&#64;&#115;&#111;&#109;&#101;&#100;&#111;&#109;&#97;&#105;&#110;&#46;&#99;&#111;&#109;">Email me</a>

At least it should raise the bar on the scaping utilities ...

Comments (3) | Post RSSRSS comment feed |

Categories:
Tags:

Comments

Comments are closed