From a657bf1388132f2bea483e3a6d36dd6bd5252a98 Mon Sep 17 00:00:00 2001 From: whut Date: Sun, 18 Apr 2021 17:46:54 -0500 Subject: [PATCH] escape chars in now playing text --- tooner.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tooner.sh b/tooner.sh index 65d4b59..b2ac28a 100755 --- a/tooner.sh +++ b/tooner.sh @@ -2,6 +2,7 @@ ! pgrep mpd > /dev/null && mpd lastFile=/tmp/radioLast.$USER nowPlaying=`mpc current -f "[%artist% - ]%title%"` +nowPlaying=`echo $nowPlaying | sed 's/&/\&/g; s//\>/g; s/"/\"/g; s/'"'"'/\'/g'` width=$((${#nowPlaying} > 30 ? ${#nowPlaying} : 30)) if [ $# -eq 0 ]; then