escape chars in now playing text

This commit is contained in:
whut 2021-04-18 17:46:54 -05:00
parent bb6ee39ef8
commit a657bf1388

View File

@ -2,6 +2,7 @@
! pgrep mpd > /dev/null && mpd
lastFile=/tmp/radioLast.$USER
nowPlaying=`mpc current -f "[%artist% - ]%title%"`
nowPlaying=`echo $nowPlaying | sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s/"/\&quot;/g; s/'"'"'/\&#39;/g'`
width=$((${#nowPlaying} > 30 ? ${#nowPlaying} : 30))
if [ $# -eq 0 ]; then