Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 96615 invoked from network); 13 Nov 2007 18:53:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2007 18:53:07 -0000 Received: (qmail 64696 invoked by uid 500); 13 Nov 2007 18:52:45 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 64685 invoked by uid 500); 13 Nov 2007 18:52:45 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 64674 invoked by uid 99); 13 Nov 2007 18:52:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2007 10:52:45 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2007 18:53:37 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Is0s7-0005dY-8h for user@struts.apache.org; Tue, 13 Nov 2007 10:52:27 -0800 Message-ID: <13732222.post@talk.nabble.com> Date: Tue, 13 Nov 2007 10:52:27 -0800 (PST) From: chengas123 To: user@struts.apache.org Subject: Escaping Characters in Struts Property Tag MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: benjamin.j.mccann@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org Hi, I want to use the struts property tag to set a JavaScript variable. Ordinarily, it would look something like: var testValue = ''; However, this does not work if the value has a single quote in it, so that character needs to be escaped. It should be easy, but I can't figure out how to do it. I can't return testValue.replaceAll("'", "\'") as I'd like to because the quotes in the call to replaceAll would interfere with the quotes in property tag. My only other idea was to create a class with a static method, but I can't figure out how to call it. Would it be something like: var testValue = '' Thanks, Ben -- View this message in context: http://www.nabble.com/Escaping-Characters-in-Struts-Property-Tag-tf4799846.html#a13732222 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org