We want the un-encoded message if we request the raw data.
authorJan Schneider <jan@horde.org>
Wed, 25 Nov 2009 10:27:47 +0000 (11:27 +0100)
committerJan Schneider <jan@horde.org>
Fri, 27 Nov 2009 12:16:37 +0000 (13:16 +0100)
framework/Notification/lib/Horde/Notification/Listener/Status.php

index 9fde069..f368487 100644 (file)
@@ -107,12 +107,12 @@ class Horde_Notification_Listener_Status extends Horde_Notification_Listener
             }
         } else {
             $text = $event->getMessage();
-            if (!in_array('content.raw', $this->getFlags($message))) {
-                $text = htmlspecialchars($text, ENT_COMPAT, Horde_Nls::getCharset());
-            }
             if (!empty($options['data'])) {
                 $result['message'] = $text;
             }
+            if (!in_array('content.raw', $this->getFlags($message))) {
+                $text = htmlspecialchars($text, ENT_COMPAT, Horde_Nls::getCharset());
+            }
         }
 
         return empty($options['data'])