Introducing Smart Firefox, the Greasemonkey script that automatically educates your text when you submit a form. Smart Firefox will convert all quotes, dashes, and apostrophes to their correct entity replacements. It only processes textareas (to avoid compatibility issues with input fields, for example if you’re searching Google), and runs onSubmit (but won’t overwrite any current existing onSubmit functionality). By default, this script runs on every page with a textarea, so if you’re working in an HTML editor or other, you will need to exclude that site on the list of sites to be processed by Smart Firefox (a simple task). Oh, it also ignores anything inside of [CODE], [PHP], or [HTML] UBB tags, and any quotes inside of HTML tags are also ignored.
So, how do you get it? Make sure you’ve got Greasemonkey installed and running, then grab the script (you can right-click and select “Install user script,” or left-click and select “Install user script” from the menubar in the top of your browser). Enjoy, folks!
Update: I’ve updated the Greasemonkey user script. Smart Firefox now converts “<-" and "->” into “←” and “→” respectively (thanks for the suggestion, Rasmus).

Bit of an obsession with Greasemonkey scripts eh Jonathan? ;)
May 22nd, 2005 at 8:21 am
I LOVE IT!! I NEED MORE!!! Also, I had to make an entry about it to add it to the Greasemonkey user script wiki. Fear not, I’ve another Greasemonkey script (less general-purpose, though) coming soon.
May 22nd, 2005 at 8:27 am
What about making replacing “–>” with →? That would be nice
June 7th, 2005 at 10:07 am
Thanks for the idea, Rasmus.
June 7th, 2005 at 10:22 pm
Will you write if you update it?
Also, I forgot to to say that it is a mighty good script you have ‘cooked’ together here :) Thanks!
June 12th, 2005 at 4:00 pm
Rasmus: I updated the script per your request; I also made a new blog entry about it.
June 12th, 2005 at 6:11 pm
Perhaps you could add
// @exclude */wp-admin/*to the script? That surely would’ve caused me less annoyance after editing a 20+ kB WordPress template :)June 18th, 2005 at 4:01 pm
Oh, and by the way, could you make it ignore everything inside
<?php ?>as well? That would’ve fixed my problem as well, and I think it’s a nice addition anyway. :)June 18th, 2005 at 4:03 pm
Hi Mathias,
I simply included every page because I chose to leave that configuration up to the user. I do realize that it’s easy to forget where the script executes (I really screwed up the Greasemonkey Wiki once with it), though. I’m not sure what to do about that. Generally, I only use Smart Firefox on forum sites because most blogs format quotes for me automatically, so I usually don’t have to worry about it then.
The script already doesn’t process anything between < and > and that includes PHP- and ASP-style tags.
June 18th, 2005 at 7:26 pm
I’m not sure if this is where youre going with the script, but could you add a UBB code to HTML changer?
or is that a project of it’s own?
lots of forums disabled the UBB, but many users still use it, so you end up with text like [b]bold[/b] and [i]italic[/i] instead of bold and italic…
-Leav
June 19th, 2005 at 10:13 am
Leav, would you be so kind as to elaborate? A different Greasemonkey script may be in order if you’re looking to convert all instances of UBB on a web page into its HTML (except where in specific tags such as code or pre, for example), but there are already existing Firefox extensions (yes, more than one) to automatically insert specific UBB at any forum you visit so you don’t have to type it in. Is this what you mean?
June 19th, 2005 at 10:19 am
Awesome. Cool code!
July 28th, 2005 at 1:57 pm
Hello there,
This post is really old, but still useful to me. There is only one problem. Is it possible to update the script, so it DOES convert the HTML and other codes inside . Or at least help me to do it myself.
Thank you in advance,
Nicholas
June 7th, 2007 at 1:37 am
I ment to convert the those codes which are inside PRE
June 7th, 2007 at 1:38 am