0 Replies Latest reply on Jul 7, 2013 10:35 AM by disabled_JustinClose

    Sending script parameter data via FMP URL is automatically decoded before being passed to the script

      Summary

      Sending script parameter data via FMP URL is automatically decoded before being passed to the script

      Product

      FileMaker Server

      Version

      12.03

      Operating system version

      Mac OS x 10.6.8

      Description of the issue

      Using a web viewer running custom javascript we are calling an FMP URL with script parameter data.  Some of this data is being encoded using HTML standard mapping (it is free-form text entry data in the web viewer, we don't want certain characters to show up in the parameter), but when it shows up in the script parameter it has already been DECODED by the FM engine.  (For the HTML standard mapping, e.g '$' = %24, '&' = %26, etc.  Mapping table can be found here:  http://www.w3schools.com/tags/ref_urlencode.asp.)

          We are not encoding it so that it will safely pass through a URL, we are encoding it because we want it encoded IN THE SCRIPT itself.

      Steps to reproduce the problem

      Create an FMP URL that has HTML standard encoded data in it being passed as a script parameter, view that same data in the script being called and it is no longer encoded.

      Expected result

      The character strings that are passed as part of the URL script parameters would REMAIN exactly as they are passed, not get altered.

      Actual result

      Parameters passed in the URL are altered before being handed to the script being called.

      Workaround

      Since I manually created the Javascript function to do the encoding, I could change the mapping of the encoding to avoid using the HTML standard mapping.