Better escaping for notify-send
authorTomas Mudrunka <tomas@mudrunka.cz>
Fri, 20 Feb 2015 14:25:46 +0000 (15:25 +0100)
committerTomas Mudrunka <tomas@mudrunka.cz>
Fri, 20 Feb 2015 14:25:46 +0000 (15:25 +0100)
purple/answerscripts.d/00-notify.sh

index 7e6f8db..6d0117d 100755 (executable)
@@ -1,3 +1,4 @@
 #!/bin/sh
 #Show notification for each incomming message
-notify-send -i pidgin "$ANSW_PROTOCOL:$ANSW_R_NAME" "$(echo "$ANSW_MSG" | sed -e 's/&/&amp;/g')"
+which recode >/dev/null && ANSW_MSG="$(echo "$ANSW_MSG" | recode ascii..html)"
+notify-send -i pidgin "$ANSW_PROTOCOL:$ANSW_R_NAME" "$ANSW_MSG"
This page took 0.146677 seconds and 4 git commands to generate.