Escape HTML special characters

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-02-28 15:49:12 +01:00
parent 72372dbffc
commit b23edce0d1
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -6,7 +6,7 @@ set -euo pipefail
exit
}
title=$(mpc | head -n1 | tr -cd "[:print:]")
title=$(mpc | head -n1 | tr -cd "[:print:]" | sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g')
state=$(mpc | grep '^\[' | sed -E 's/^\[(.+)\].*/\1/')
case ${state} in