diff --git a/http/bin/gmi2upphtml b/http/bin/gmi2upphtml
index b43693d..1631037 100755
--- a/http/bin/gmi2upphtml
+++ b/http/bin/gmi2upphtml
@@ -53,7 +53,14 @@ close_all_open_blocks()
escape_upphtml()
{
- echo "$1" | sed "s/\`/\\\\\`/g" | sed "s/\"/\\\\\"/g" | sed "s/\\\$/\\\\\$/g"
+ echo "$1" \
+ | sed "s/&/\\&/g" \
+ | sed "s/\\</g" \
+ | sed "s/>/\\>/g" \
+ | sed "s/\"/\\"/g" \
+ | sed "s/'/\\'/g" \
+ | sed "s/\`/\\`/g" \
+ | sed "s/\\\$/\\\\\$/g"
}
close_all_open_blocks_except()