Passing encoded url string containing %3A (colon) truncates everting after the last %3A [message #665195] |
Fri, 25 August 2017 04:27 |
|
kjeand
Messages: 5 Registered: August 2017 Location: Sweden
|
Junior Member |
|
|
Hi
I am a relative newbie to APEX from Sweden (not so god at english)
I am passing an url string to an apex application where i have encoded all special caracters, if there i a %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 i works i APEX.
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 att 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"
i works ok and P32_ZZ get the value "VMKF:U 2012:50".
Appreciate help
thanks
Kjell
|
|
|
|
|
|
|
Re: Passing encoded url string containing %3A (colon) truncates everting after the last %3A [message #665202 is a reply to message #665200] |
Fri, 25 August 2017 09:06 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
As Apex URL contains colons to separate parameters, maybe colons - as a part of your own values - "confuse" Apex and it behaves the way you described.
You found a workaround (adding %3A to the end of the string).
Another one might be changing colon to something else (for example, a minus, underline or similar character) and converting it back to a colon once the URL is accepted by your application.
Or, you might store the parameters' list into a table, read it in your application and compose the complete URL.
Also, have a look at OTN's Apex forum, it is visited by (some) Apex authors and you might get a proper answer there. Unfortunately, I don't know what else to suggest.
|
|
|
|