[dev] [framework][patch] javascript error in imp/mailbox.php
Martin Luethi
horde at humbapa.ch
Thu Feb 19 01:15:15 PST 2004
hi list,
the following subject (from message source):
Subject: Broker FTP DoS (Message Server)=?iso-8859-1?q?=0A?=
gives me a javascript error in imp/mailbox.php about "Unterminated string
constant"
when I take a look at the html-source then there is a newline in the onmouseover
event for the subject
I modified the methode "link" in framework/Horde/Horde.php so that the newlines
will be removed for the status (see patch)
g. tinu
-------------- next part --------------
Index: framework/Horde/Horde.php
===================================================================
RCS file: /repository/framework/Horde/Horde.php,v
retrieving revision 1.385
diff -u -r1.385 Horde.php
--- framework/Horde/Horde.php 18 Feb 2004 22:25:41 -0000 1.385
+++ framework/Horde/Horde.php 19 Feb 2004 09:10:13 -0000
@@ -562,7 +562,7 @@
$ret .= " onclick=\"$onclick\"";
}
if (!empty($status)) {
- $ret .= ' onmouseout="window.status=\'\';" onmouseover="window.status=\'' . @htmlspecialchars(addslashes($status), ENT_QUOTES, NLS::getCharset()) . '\'; return true;"';
+ $ret .= ' onmouseout="window.status=\'\';" onmouseover="window.status=\'' . @htmlspecialchars(strtr(addslashes($status), array("\r" => '', "\n" => '')), ENT_QUOTES, NLS::getCharset()) . '\'; return true;"';
}
if (!empty($class)) {
$ret .= " class=\"$class\"";
More information about the dev
mailing list