Results 1 to 2 of 2

Thread: Problem with file upload response: '&' not getting replaced

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    286

    Default Problem with file upload response: '&' not getting replaced

    REQUIRED INFORMATION


    Ext version tested:
    • Ext 4.0.7


    Browser versions tested against:
    • Chrome


    DOCTYPE tested against:
    • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


    Description:
    Ext.form.Basic API docs says: Characters which are significant to an HTML parser must be sent as HTML entities, so encode "<" as "&lt;", "&" as "&amp;" etc.

    However when my file upload servlet returns with content type = text/html the following:

    HTML Code:
    {&quot;nextUrl&quot;:&quot;import.wm?sk=1234&amp;step=2&quot;,&quot;nextArgs&quot;:null,&quot;success&quot;:true}
    In my handler code is javascript, I get a javascript object as expected with a property "nextUrl". However the value of "nextUrl" still has the "&amp;" in it. I am expecting it to be : import.wm?sk=1234&step=2 but I get: import.wm?sk=1234&amp;step=2

    HELPFUL INFORMATION


    Debugging already done:
    • none


    Possible fix:
    • If I do not html encode the response everything seems to work fine (at least in Chrome and IE9)

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    Is your JSON exactly like this?

    Code:
    {&quot;nextUrl&quot;:&quot;import.wm?sk=1234&amp;step=2&quot;,&quot;nextArgs&quot;:null,&quot;success&quot;:true}
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •