Return-Path: X-Original-To: apmail-struts-commits-archive@minotaur.apache.org Delivered-To: apmail-struts-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4B2BB7DCF for ; Mon, 10 Oct 2011 17:31:29 +0000 (UTC) Received: (qmail 45428 invoked by uid 500); 10 Oct 2011 17:31:29 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 45400 invoked by uid 500); 10 Oct 2011 17:31:28 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 45393 invoked by uid 99); 10 Oct 2011 17:31:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2011 17:31:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2011 17:31:27 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A2F2B2388A33 for ; Mon, 10 Oct 2011 17:31:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1181085 - /struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl Date: Mon, 10 Oct 2011 17:31:07 -0000 To: commits@struts.apache.org From: lukaszlenart@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111010173107.A2F2B2388A33@eris.apache.org> 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')/> - ${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/> @@ -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; } } - \ No newline at end of file +