Escape Entities Greasemonkey Script
When you post to groups such as Flickr, or to blogs using tools such as Movable Type, you are often free to use a selection of HTML tags. This is very handy for adding links, images and basic formatting, but it comes with a downside—if you ever want to write an HTML snippet that someone can read, perhaps in order to allow them to cut and paste it, you have to manually escape the different HTML entities.< becomes <, > becomes >, & becomes & and " becomes ".
To make life easier, I've written a Greasemonkey script that attaches itself to any <textarea> elements on the page and provides a handy icon that when clicked on converts any special characters into their corresponding entities. Just type your text into the textarea:

Select the text you wish to escape and click on the
icon. Your selected text will be escaped:

To use this script, you need to be running Firefox with Greasemonkey installed.
To install, click here to download the script. You should then be prompted by Greasemonkey to install the script..
To uninstall the script, go to the Tools menu in Firefox and select "Greasemonkey -> Manage User Scripts". Select the script "Escape Entities" and press the "Uninstall" button.
Update: 11th March 2008: By default, add photophlow to the exclude list to avoid breaking their layout in a very annoying way.
Install the Escape Entities script