[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglibs-user
Subject:    RE: escaping quotes (single and double)
From:       <bayard () generationjava ! com>
Date:       2002-02-15 23:21:15
[Download RAW message or body]

Ditto for String taglib. It has an escapeXml format that should handle
that.

On Fri, 15 Feb 2002, Aamir Saalam wrote:

> how about using the html taglib?
>
> for ex. <html:text property="someproperty" size="35" value="<%= somevalue %>" />
>
> --aamir
>
> -----Original Message-----
> From: Agrawal, Anuj (Anuj)** CTR ** [mailto:agrawal@lucent.com]
> Sent: Friday, February 15, 2002 1:40 PM
> To: 'taglibs-user@jakarta.apache.org'
> Subject: escaping quotes (single and double)
>
>
> My jsp page has a form with a text field (INPUT TYPE="text") which gets its
> value pre-populated with some result from a database query.
>
> The problem is the string coming back from the database query could contain
> single or double quotes - so the resulting form code could look go from:
>
> <INPUT NAME="somefield" VALUE="<%= somevalue %>">
>
> to:
>
> <INPUT NAME="somefield" VALUE="Welcome to my "DeathStar", ladies and
> gentlemen">
>
> which of course creates a problem during display cos of the double-quotes.
>
> Is there an elegant way of escaping those quotes?
>
> Thanks.
>
> --
> To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic