ampersand sequencer
This commit is contained in:
parent
85145ba1e2
commit
a873721b0c
16
homepage/htmlfriend.sh
Normal file
16
homepage/htmlfriend.sh
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
# This is a script that turns "stuff" (any text) into text that can be in HTML
|
||||
# documents without weirdness. So, turn '>' into ">", 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/&/\&/g' \
|
||||
-e 's/\"/\"/g' \
|
||||
-e 's/</\</g' \
|
||||
-e 's/>/\>/g' \
|
||||
-e 's/Þ/Þ/g' \
|
||||
-e 's/þ/þ/g'
|
||||
# add more as necessary
|
Loading…
Reference in New Issue
Block a user