struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcucchi...@apache.org
Subject svn commit: r1183256 - /struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/AbstractMessageListHandler.java
Date Fri, 14 Oct 2011 09:24:29 GMT
Author: mcucchiara
Date: Fri Oct 14 09:24:28 2011
New Revision: 1183256

URL: http://svn.apache.org/viewvc?rev=1183256&view=rev
Log:
WW-3693 - Javatemplate engine ignores escape parameter of action message tag

Modified:
    struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/AbstractMessageListHandler.java

Modified: struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/AbstractMessageListHandler.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/AbstractMessageListHandler.java?rev=1183256&r1=1183255&r2=1183256&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/AbstractMessageListHandler.java
(original)
+++ struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/AbstractMessageListHandler.java
Fri Oct 14 09:24:28 2011
@@ -20,6 +20,7 @@
  */
 package org.apache.struts2.views.java.simple;
 
+import org.apache.commons.lang.BooleanUtils;
 import org.apache.struts2.util.MakeIterator;
 import org.apache.struts2.views.java.Attributes;
 import org.apache.struts2.views.java.TagGenerator;
@@ -39,6 +40,7 @@ public abstract class AbstractMessageLis
         if (errorsObj != null) {
             Iterator itt = MakeIterator.convert(errorsObj);
             if (itt.hasNext()) {
+                boolean escape = BooleanUtils.toBooleanDefaultIfNull((Boolean) params.get("escape"),
false);
                 Attributes attrs = new Attributes();
                 attrs.addIfExists("style", params.get("cssStyle"))
                         .add("class", params.containsKey("cssClass") ? (String) params.get("cssClass")
: getDefaultClass());
@@ -51,7 +53,7 @@ public abstract class AbstractMessageLis
 
                     //span for error
                     start("span", null);
-                    characters(error);
+                    characters(error, escape);
                     end("span");
                     end("li");
 



Mime
View raw message