struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject svn commit: r1181085 - /struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl
Date Mon, 10 Oct 2011 17:31:07 GMT
Author: lukaszlenart
Date: Mon Oct 10 17:31:07 2011
New Revision: 1181085

URL: http://svn.apache.org/viewvc?rev=1181085&view=rev
Log:
WW-3047 - adds js_script to escape the option label and value

Modified:
    struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl

Modified: struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl?rev=1181085&r1=1181084&r2=1181085&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl Mon Oct
10 17:31:07 2011
@@ -101,7 +101,7 @@
         <#else>
             <#assign doubleItemValue = stack.findString('top')/>
         </#if>
-    ${parameters.id}Group[${itemCount}][${doubleItemCount}] = new Option("${doubleItemValue}",
"${doubleItemKeyStr}");
+    ${parameters.id}Group[${itemCount}][${doubleItemCount}] = new Option("${doubleItemValue?js_string}",
"${doubleItemKeyStr?js_string}");
 
         <#assign doubleItemCount = doubleItemCount + 1/>
     </@s.iterator>
@@ -134,13 +134,13 @@
             <#if parameters.doubleNameValue?exists>
                    <#if parameters.doubleMultiple?exists>
                          for (j = 0; j < ${parameters.doubleNameValue}.length; j++) {
-                             if (${parameters.id}Temp.options[i].value == ${parameters.doubleNameValue}[j])
{
+                             if (${parameters.id}Temp.options[i].value == ${parameters.doubleNameValue?js_string}[j])
{
                                ${parameters.id}Temp.options[i].selected = true;
                                 selected = true;
                              }
                         }
                    <#else>
-                        if (${parameters.id}Temp.options[i].value == '${parameters.doubleNameValue}')
{
+                        if (${parameters.id}Temp.options[i].value == '${parameters.doubleNameValue?js_string}')
{
                             ${parameters.id}Temp.options[i].selected = true;
                             selected = true;
                         }
@@ -152,4 +152,4 @@
            	${parameters.id}Temp.options[0].selected = true;
         }
     }
-</script>
\ No newline at end of file
+</script>



Mime
View raw message