From: Michael M Slusarz Date: Sat, 11 Apr 2009 22:13:29 +0000 (-0600) Subject: Catch invalid addresses X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=384897521d636f98e84c7f7a7fec245c7f757d8a;p=horde.git Catch invalid addresses --- diff --git a/imp/js/src/DimpBase.js b/imp/js/src/DimpBase.js index c84502983..ed0c1ad13 100644 --- a/imp/js/src/DimpBase.js +++ b/imp/js/src/DimpBase.js @@ -458,8 +458,10 @@ var DimpBase = { row[search] = row[search].gsub(new RegExp("(" + $F('msgList_filter') + ")", "i"), '#{1}'); } - // Check status. If null, invalid string was scrubbed by the - // JSON encode. + // If null, invalid string was scrubbed by JSON encode. + if (row.from === null) { + row.from = '[' + DIMP.text.badaddr + ']'; + } if (row.subject === null) { row.subject = '[' + DIMP.text.badsubject + ']'; } diff --git a/imp/lib/DIMP.php b/imp/lib/DIMP.php index 0eb7ba5e9..7b11cd2fa 100644 --- a/imp/lib/DIMP.php +++ b/imp/lib/DIMP.php @@ -244,6 +244,7 @@ class DIMP 'check' => _("Checking..."), 'verify' => _("Verifying..."), 'onlogout' => _("Logging Out..."), + 'badaddr' => _("Invalid Address"), 'badsubject' => _("Invalid Subject"), 'ajax_timeout' => _("There has been no contact with the remote server for several minutes. The server may be temporarily unavailable or network problems may be interrupting your session. You will not see any updates until the connection is restored."), 'ajax_recover' => _("The connection to the remote server has been restored."),