Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

URL with item value containing colon

Chintan GandhiFeb 25 2019 — edited Feb 26 2019

Hi,

I am working on

Oracle APEX: 18.2.0.00.12

DB: Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production

I have a value that may contain colon character ':' and it is to be passed in the URL.

To handle this, I have done encoding as below in a PL/SQL dynamic content region:

In this example, I want to send Arrangement Number = 339787741||R:29MAY17 23:05:48

DECLARE

   v_url VARCHAR2(4000);

   v_arrangement_number VARCHAR2(200) := '339787741||R:29MAY17 23:05:48';

   v_encoded_arr VARCHAR2(4000);

BEGIN

   v_encoded_arr := APEX_UTIL.URL_ENCODE(v_arrangement_number);

   v_url := 'f?p=&APP_ID.:137:&SESSION.::&DEBUG.:RP,137:P137_ARRANGEMENT_NUMBER:'||v_encoded_arr;

   htp.p('Arrangement Number: '|| v_arrangement_number);

   htp.p('<br />');

   htp.p('Encoded Arrangement Number: '|| v_encoded_arr);

   htp.p('<br />');

   htp.p('Encoded URL: '|| v_url);

   htp.p('<br />');

   htp.p('<a href='||v_url||' >Arrangement</a>');

END;

Output of above:

Arrangement Number: 339787741||R:29MAY17 23:05:48

Encoded Arrangement Number: 339787741%7C%7CR%3A29MAY17+23%3A05%3A48

Encoded URL: f?p=1801:137:2674534690676::YES:RP,137:P137_ARRANGEMENT_NUMBER:339787741%7C%7CR%3A29MAY17+23%3A05%3A48

http://mydomain:8080/ords/f?p=1801:137:2674534690676::YES:RP,137:P137_ARRANGEMENT_NUMBER:339787741%7C%7CR%3A29MAY17+23%3A05%3A48

As you can see, value got encoded properly and URL is formed right too.

And on click of this URL, when on target page, in the browser address bar too, I see encoded value as below:

http://mydomain:8080/ords/f?p=1801:137:2674534690676::YES:RP,137:P137_ARRANGEMENT_NUMBER:339787741%7C%7CR%3A29MAY17+23%3A05%3A48

But value in the item P137_ARRANGEMENT_NUMBER is getting truncated. It has all the colons and special characters, except that the part after last colon is truncated.

339787741||R:29MAY17 23:05

I see that similar issue was asked on Ask Tom as well (https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:9536432900346765952 )

Am I missing something here? Can someone help point in the right direction?

Thanks,

Chintan

Comments
Post Details
Added on Feb 25 2019
2 comments
493 views