Search code examples
oracle-apex-5

Passing encoded url string containing %3A (colon) to an APEX page truncates everting after the last %3A


I am using ORACLE APEX 5.0.1

I am passing an url string to an APEX application where I have encoded all special caracters, if there is one or more %3A (colon) in the url APEX seemes to truncate the value I am passing. This affects only the last variable I am passing and only the remaining part after the last %3A, but if I place a %3A at the very end of the url it works in APEX. I have asked about this in other forums and it seems to be a relative unknown issue in APEX, haven't got any relevant answer that explains the issue.

This example pass values to tre fields

"...../apex/f?p=118:32:::::P32_XX,P32_YY,P32_ZZ,:100030,486,VMKF%3AU%202012%3A50"

P32_XX, and P32_YY get the value ok P32_ZZ only get the value "VMKF:U 2012" but if I put a %3A at the end of the url like this

"...../apex/f?p=118:32:::::P32_XX,P32_YY,P32_ZZ,:100030,486,VMKF%3AU%202012%3A50%3A"

it works ok and P32_ZZ gets the value "VMKF:U 2012:50".

I have tested this in Windows Explorer 11, Google Crom and Mozilla Firefox (latest version) with the same behavior.

And I have the same behaviour if I use a literal colon (:)

Appreciate the help


Solution

  • The issue is that the colon is a separator for the different parts of the APEX URL. I am surprised that using %3F doesn't fix it, but the solution is to surround the whole value by \...\ like this:

    ...../apex/f?p=118:32:::::P32_XX,P32_YY,P32_ZZ,:100030,486,\VMKF%3AU%202012%3A50\
    

    Note that you don't even need to escape the colons now:

    ...../apex/f?p=118:32:::::P32_XX,P32_YY,P32_ZZ,:100030,486,\VMKF:U%202012:50\