xmlescape bash
7. 6. 2018xmlescape () {
echo "$@" | sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g; s/'"'"'/\'/g'
}
xmlescape "&"
should return
&
https://stackoverflow.com/questions/12873682/short-way-to-escape-html-in-bash