[24256] in Source-Commits
/svn/athena r23854 - trunk/debathena/debathena/xsession/debian
daemon@ATHENA.MIT.EDU (Evan Broder)
Mon Jun 15 18:11:47 2009
Date: Mon, 15 Jun 2009 18:11:37 -0400
From: Evan Broder <broder@MIT.EDU>
Message-Id: <200906152211.n5FMBbOW019577@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: broder
Date: 2009-06-15 18:11:37 -0400 (Mon, 15 Jun 2009)
New Revision: 23854
Modified:
trunk/debathena/debathena/xsession/debian/changelog
trunk/debathena/debathena/xsession/debian/displaylert
trunk/debathena/debathena/xsession/debian/displaymotd
Log:
In xsession:
* Replace HTML entities in displaymotd and displaylert, to work around
LP #387536. (Trac: #284)
Modified: trunk/debathena/debathena/xsession/debian/changelog
===================================================================
--- trunk/debathena/debathena/xsession/debian/changelog 2009-06-15 21:07:06 UTC (rev 23853)
+++ trunk/debathena/debathena/xsession/debian/changelog 2009-06-15 22:11:37 UTC (rev 23854)
@@ -1,3 +1,10 @@
+debathena-xsession (1.10) unstable; urgency=low
+
+ * Replace HTML entities in displaymotd and displaylert, to work around
+ LP #387536. (Trac: #284)
+
+ -- Evan Broder <broder@mit.edu> Mon, 15 Jun 2009 18:10:30 -0400
+
debathena-xsession (1.9.3) unstable; urgency=low
* Don't let people set debathena-nocalls as their default session.
Modified: trunk/debathena/debathena/xsession/debian/displaylert
===================================================================
--- trunk/debathena/debathena/xsession/debian/displaylert 2009-06-15 21:07:06 UTC (rev 23853)
+++ trunk/debathena/debathena/xsession/debian/displaylert 2009-06-15 22:11:37 UTC (rev 23854)
@@ -1,4 +1,10 @@
#!/bin/sh
-lertmsg=$(lert)
+# zenity expects Pangotext, which is something like HTML, so we need
+# to strip entities
+lertmsg=$(lert | sed -e 's/&/\&/;' \
+ -e 's/</\</' \
+ -e 's/>/\>/' \
+ -e 's/"/\"/' \
+ -e "s/'/\'/")
[ -n "$lertmsg" ] && zenity --no-wrap --info --text="$lertmsg"
Modified: trunk/debathena/debathena/xsession/debian/displaymotd
===================================================================
--- trunk/debathena/debathena/xsession/debian/displaymotd 2009-06-15 21:07:06 UTC (rev 23853)
+++ trunk/debathena/debathena/xsession/debian/displaymotd 2009-06-15 22:11:37 UTC (rev 23854)
@@ -1,6 +1,12 @@
#!/bin/sh
-motd=$(get_message -new)
+# We need to strip out HTML entities because zenity takes something
+# that pretends to be HTML
+motd=$(get_message -new | sed -e 's/&/\&/;' \
+ -e 's/</\</' \
+ -e 's/>/\>/' \
+ -e 's/"/\"/' \
+ -e "s/'/\'/")
[ -n "$motd" ] && zenity --no-wrap --info --text="
Athena message of the day:
$motd"