Punct!

Published 07:25 on 21 March, 2006

Most web developers have, at some point, experienced the pain of browsing through client-written content to change symbols into meaningful HTML entities. Of course, a lot of the time, we’re even using the wrong entities!

Well, now it’s a little easier with the help of “Punct!,” a client-side script I have created for two reasons; as an experiment in JSON and to save time when cutting and pasting code from Word documents into web sites.

Punct basically takes any content pasted or typed into it and converts characters such as em-dashes, quotes and horizontal ellipses into their relevant best HTML entities. You can also specify whether to include paragraph tags which helps anyone pasting content into Wordpress (like this very article).To have a go, click the link below:

Punct, a web-based content aid…

Incidentally, this is only version 1.3 — it’s not perfect, it’s not my final word on the matter (it’s the beginning of something far bigger), it jams the content preview into the page using innerHTML (a nasty method) and it’s only available with Javascript turned on since I wanted to utilise client-side processing power. I’m only really launching it here since several of my fellow developers at Rentokil seem quite keen on using it. Watch this space for further developments!