From: Mark Wooding Date: Thu, 26 Jul 2018 00:05:25 +0000 (+0100) Subject: bin/disorder-notify, dot/e16-bindings: Escape HTMLish stuff in notifications. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/0452eefcdebc1264ec736e99220f8f5280c4c855 bin/disorder-notify, dot/e16-bindings: Escape HTMLish stuff in notifications. The documentation I found didn't obviously mention that this text was HTMLish. Oh, well. --- diff --git a/bin/disorder-notify b/bin/disorder-notify index e530cc3..e801d3d 100755 --- a/bin/disorder-notify +++ b/bin/disorder-notify @@ -3,6 +3,9 @@ sub notify ($$) { my ($head, $body) = @_; + $body =~ s:\&:&:g; + $body =~ s:\<:<:g; + $body =~ s:\>:>:g; my $kid = fork; defined $kid or return; if (!$kid) { diff --git a/dot/e16-bindings b/dot/e16-bindings index 064a3c3..2250e48 100644 --- a/dot/e16-bindings +++ b/dot/e16-bindings @@ -65,7 +65,7 @@ KeyDown C5 apostrophe exec xinitcmd disobedience KeyDown C5 plus exec media-keys volume-up KeyDown C5 minus exec media-keys volume-down KeyDown C5 period exec media-keys enable/disable -KeyDown C5 comma exec gdbus call -e -d org.freedesktop.Notifications -o /org/freedesktop/Notifications -m org.freedesktop.Notifications.Notify -- DisOrder 0 audio-volume-high "Now playing" "$(media-keys now-playing)" "[]" "{}" 5000 +KeyDown C5 comma exec gdbus call -e -d org.freedesktop.Notifications -o /org/freedesktop/Notifications -m org.freedesktop.Notifications.Notify -- DisOrder 0 audio-volume-high "Now playing" "$(media-keys now-playing | sed 's:&:&:g; s:<:<:g; s:>:>:g')" "[]" "{}" 5000 KeyDown C5 slash exec media-keys scratch KeyDown C5 space exec media-keys play/pause KeyDown C5 F1 menus show file.menu