Skip to main content
lionelc0001
June 30, 2021
Question

Encoding issue with a single quote in a query parameter

  • June 30, 2021
  • 2 replies
  • 1 view

Hi everyone,

I am facing the following issue: When querying from my integration I am passing a text rule input with a single quote ['] in it. This character is automatically encoded to [%27] like all other special characters in the query but since it is also the separator in my query it's not working.

How can I handle this and act on the query parameter encoding?

Thank you

Example:

ri!name (Text): "Mont d'Or"

query parameter: "PLTXT eq '"&ri!name&"'"

URL: [...] PLTXT+eq+%27Mont+d%27Or%27

    2 replies

    peter.lewis
    Employee
    June 30, 2021

    I'm not sure I understand this part:

    since it is also the separator in my query it's not working

    Are you saying that the API you're calling expects that the parameter includes the name encased in single quotes? If so, you probably need to work with the API to determine what syntax they would expect to receive if there is a name with a quote in it. You could certainly substitute any character it expects instead, but keep in mind that any API call will encode special characters: www.w3schools.com/.../ref_urlencode.asp

    lionelc0001
    July 2, 2021

    Thanks for your answer. Indeed 'separator' was not correct, I meant that I have to put the name between single quotes. I'll look for the solution on the API side.

    Regards