From b23edce0d19e303b5530c4430265e77f841336a0 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 28 Feb 2019 15:49:12 +0100 Subject: [PATCH] Escape HTML special characters Signed-off-by: Knut Ahlers --- .config/i3blocks/mpc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/i3blocks/mpc b/.config/i3blocks/mpc index 26e3fe4..b21495c 100755 --- a/.config/i3blocks/mpc +++ b/.config/i3blocks/mpc @@ -6,7 +6,7 @@ set -euo pipefail exit } -title=$(mpc | head -n1 | tr -cd "[:print:]") +title=$(mpc | head -n1 | tr -cd "[:print:]" | sed 's/&/\&/g; s//\>/g') state=$(mpc | grep '^\[' | sed -E 's/^\[(.+)\].*/\1/') case ${state} in