aspose file tools*
The moose likes Struts and the fly likes <HTML:TEXT> tag issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "<HTML:TEXT> tag issue" Watch "<HTML:TEXT> tag issue" New topic
Author

<HTML:TEXT> tag issue

Agur Dunit
Greenhorn

Joined: Sep 30, 2008
Posts: 24
Hi!

I have an issue with the <HTML:TEXT> strus tag. The tag don't decodes the caracters coded in ascii. For example the <html:text name="userForm" property="comment" style="width:300px" styleClass="styleT"/> shows can't use instead of can't use if the property "comment" is setted in the action form to comment=can't. The apostrophe coded by ' is not decoded by this tag.

The <c : out value="${comment}" escapeXML=false> resolves the probleme but i have to conserve the equivalent syntax.

Is there any way to resolve the probleme?

Thank you for your help

>
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Honestly, dosen't get what you want to convey ? If you are facing problem in using " ' " (apostrophe) character then I suggest use escape character, like . If not then elaborate.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Agur Dunit
Greenhorn

Joined: Sep 30, 2008
Posts: 24
The apostrophe is coded in the database with corresponding ascii code for security purpose. So, the escape caracter don't resolve the probleme!
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Then, don't use apostrophe ASCII character, simply while setting its form property, just replace that ASCII number with hardcoded " ' " character !
Agur Dunit
Greenhorn

Joined: Sep 30, 2008
Posts: 24
for security reasons we can't do that.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Then you'll have to un-escape it on the server side.

There's no "security issue" with escaping strings before saving to the DB--you don't need to encode single-quotes as ASCII to sanitize SQL.
Agur Dunit
Greenhorn

Joined: Sep 30, 2008
Posts: 24
I will unescape in the server side; i think it's good solution.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: <HTML:TEXT> tag issue