Hello,

Thanks for your answer. You are right that's what happening. On submission 
input text sterling sign "£" escaped to the "ISO-8859-1" "£" and when try 
to display it again in the same html:text box it escape it again. So how can I 
avoid it what should I do. UTF8 work fine but it put some other constraint like 
database encoding. 

I attached the code: JSP, action class, form class, and Struts config.


I did not find any attribute "escape" in struts user guide can you give me some 
example. I am using struts 1.2.9. 

Thanks for your help.

Regards, 


-----Original Message-----
From: Laurie Harper [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 28, 2008 7:35 PM
To: user@struts.apache.org
Subject: Re: Ampersand sign problem

Can you post a code sample of what you are doing? html:text will only 
escape its output once, so perhaps you are passing it a string that has 
already been converted into the character entity form (£)?

You could try escape="false", but I'd suggest understanding what's going 
on first so you're confident that you aren't opening up 
cross-site-scripting or other Javascript injection vulnerabilities by 
doing so.

L.

Nayyer Kamran wrote:
> Hello,
> 
>  
> 
> I am trying to use "ISO-8859-1" char set in my web application. But when I 
> try to display "?" sign using html:text field it displays "£". If I look 
> at the HTML source there I see that "&" is escaped by the character entity 
> "&" so now instead of "£" the value is "£" .  Where as if I 
> use simple input field to display this value it work fine. 
> 
>  
> 
> I believe this is because html:text tag escaping "&" sign.  How I can avoid 
> this multiple escaping.
> 
>  
> 
> I am using jbossAS 4.0.5, Struts 1.2.9.
> 
>  
> 
> Any help will be appreciated. 
> 
>  
> 
> Regards, 
> 
>  
> 
>  
> 
>  
> 
>  
> 
> 
> *******************************************************************************
> This email and any files transmitted with it are intended solely for the use 
> of the individual or entity to whom they are addressed, and may contain 
> confidential and/or proprietary information. Therefore, any dissemination, 
> distribution or copy of this email or such attached files, or the information 
> contained herein and therein, should be appropriately restricted. 
>  
> If you have received this email in error please notify the sender immediately 
> by return email and kindly delete this message and all attachments..
> *******************************************************************************
> 
> 
> 


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE struts-config PUBLIC 
             "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
             "http://struts.apache.org/dtds/struts-config_1_2.dtd";>


<!-- This is the Struts configuration file for the JOB project -->
<struts-config>

    <!-- ========== Form Bean Definitions =================================== -->
    <form-beans>
        <form-bean name="newForm" 
                   type="com.orbian.job.web.common.NewForm" />
    </form-beans>
    
    <action-mappings>

        <action path="/simple"
                input="/encode.jsp"
                name="newForm"
                scope="request"     
                type="com.orbian.job.web.common.SimpleAction">
            <forward name="next" path="/encode.jsp" />
        </action>
        
        
    </action-mappings>
    
</struts-config>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to