You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by zargarf <fa...@gmail.com> on 2007/12/06 14:16:49 UTC
Struts input sends < > encoded as < and > to form bean. Help!
Hi
Got a problem. We're using the struts portlet framework for websphere portal
and are encountering an issue whereby if a user inputs the following
characters, < > or £, then the form bean receives the values as < >
etc.
As this problem has only been noticed a year down the line, the information
is getting stored in the database (via Hibernate) as <, > etc.
I was wondering, if there's anyway to automatically convert these back to
the original < > characters before they are set to the form attributes.
Cheers
Faisal Zargar
--
View this message in context: http://www.nabble.com/Struts-input-sends-%3C-%3E-encoded-as--lt--and--gt--to-form-bean.-Help%21-tf4955929.html#a14191931
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
Re: Struts input sends < > encoded as < and > to form bean. Help!
Posted by Antonio Petrelli <an...@gmail.com>.
2007/12/6, zargarf <fa...@gmail.com>:
>
> I was wondering, if there's anyway to automatically convert these back to
> the original < > characters before they are set to the form attributes.
Probably you are interested in Commons Lang StringEscapeUtils.unescapeXml:
http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringEscapeUtils.html#unescapeXml(java.lang.String)
Antonio