Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-2445

ajaxproxy.setForm ampersand breaks request parameters

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.1.0.009, 4.0.4.001
    • Fix Version/s: None
    • Environment:

      Linux (2.6.32-358.2.1.v6.x86_64) 64bit
      Host Name default.railo.web
      Servlet Container Apache Tomcat/7.0.37
      Java 1.7.0_17 (Oracle Corporation) 64bit

      Description

      If a form input value contains an ampersand, the railo ajax method `setForm` breaks. The request parameters are messed up. One can see that the arguments send are not complete, anything after the ampersand is missing.

      AjaxProxy.cfc listing:
      <cfcomponent>

      <cffunction name="doTest" access="remote" returntype="string">

      <cfset var stReturn =

      {nStatus=-1}

      >

      <cfdump var="#arguments#"><cfabort>

      <cfreturn serializeJSON(stReturn)>
      </cffunction>

      </cfcomponent>

      index.cfm listing:
      <cfajaxproxy cfc="AjaxProxy" jsclassname="CFAjaxProxy" />
      <cfhtmlhead text='<script>oProxy=new CFAjaxProxy();</script>' />
      <html>
      <head>
      <script type="text/javascript">
      function doTest()

      { oProxy.setForm('frm'); oProxy.doTest(); }

      </script>
      </head>
      <body>
      <h1>Ajaxproxy-`&` issue</h1>

      <form id="frm" method="post" action="index.cfm">
      <input type="text" name="test" value="This & that" />
      <input type="button" name="do_test" value="Send" onclick="doTest();" />
      </form>

      </body>
      </html>

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                micstriit Michael Offner
                Reporter:
                elkodesign Elko van den Busken
              • Votes:
                2 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: