[24257] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r23855 - trunk/debathena/debathena/xsession/debian

daemon@ATHENA.MIT.EDU (Evan Broder)
Mon Jun 15 18:24:05 2009

Date: Mon, 15 Jun 2009 18:23:54 -0400
From: Evan Broder <broder@MIT.EDU>
Message-Id: <200906152223.n5FMNsL3020456@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:23:54 -0400 (Mon, 15 Jun 2009)
New Revision: 23855

Modified:
   trunk/debathena/debathena/xsession/debian/displaylert
   trunk/debathena/debathena/xsession/debian/displaymotd
Log:
In displaymotd and displaylert, replace all instances of an HTML
special character on a line, not just the first.



Modified: trunk/debathena/debathena/xsession/debian/displaylert
===================================================================
--- trunk/debathena/debathena/xsession/debian/displaylert	2009-06-15 22:11:37 UTC (rev 23854)
+++ trunk/debathena/debathena/xsession/debian/displaylert	2009-06-15 22:23:54 UTC (rev 23855)
@@ -2,9 +2,9 @@
 
 # zenity expects Pangotext, which is something like HTML, so we need
 # to strip entities
-lertmsg=$(lert | sed -e 's/&/\&amp;/;' \
-    -e 's/</\&lt;/' \
-    -e 's/>/\&gt;/' \
-    -e 's/"/\&quot;/' \
-    -e "s/'/\&apos;/")
+lertmsg=$(lert | sed -e 's/&/\&amp;/g' \
+    -e 's/</\&lt;/g' \
+    -e 's/>/\&gt;/g' \
+    -e 's/"/\&quot;/g' \
+    -e "s/'/\&apos;/g")
 [ -n "$lertmsg" ] && zenity --no-wrap --info --text="$lertmsg"

Modified: trunk/debathena/debathena/xsession/debian/displaymotd
===================================================================
--- trunk/debathena/debathena/xsession/debian/displaymotd	2009-06-15 22:11:37 UTC (rev 23854)
+++ trunk/debathena/debathena/xsession/debian/displaymotd	2009-06-15 22:23:54 UTC (rev 23855)
@@ -2,11 +2,11 @@
 
 # We need to strip out HTML entities because zenity takes something
 # that pretends to be HTML
-motd=$(get_message -new | sed -e 's/&/\&amp;/;' \
-    -e 's/</\&lt;/' \
-    -e 's/>/\&gt;/' \
-    -e 's/"/\&quot;/' \
-    -e "s/'/\&apos;/")
+motd=$(get_message -new | sed -e 's/&/\&amp;/g' \
+    -e 's/</\&lt;/g' \
+    -e 's/>/\&gt;/g' \
+    -e 's/"/\&quot;/g' \
+    -e "s/'/\&apos;/g")
 [ -n "$motd" ] && zenity --no-wrap --info --text="
 Athena message of the day:
 $motd"


home help back first fref pref prev next nref lref last post