#!/bin/sh
# This is a script that turns "stuff" (any text) into text that can be in HTML
# documents without weirdness. So, turn '>' into "&gt;", etc.
# Right now it just turns certain chars into their ampersand sequences but more
# features will be added if necessary.

# http://rabbit.eng.miami.edu/info/htmlchars.html
# order matters; ampersand must be first
sed \
	-e 's/&/\&amp;/g'   \
	-e 's/\"/\&quot;/g' \
	-e 's/</\&lt;/g'    \
	-e 's/>/\&gt;/g'    \
	-e 's/Þ/&THORN;/g'  \
	-e 's/þ/&thorn;/g'
# add more as necessary
