Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print escaped HTML characters in Oracle XML Publisher

I am using Oracle's XML Publisher (based on Oracle XML Parser 10.1.0.5.0) to generate reports from my db using an .RTF template.

In my front end the user enters some values in a CK Editor like the following image:

enter image description here

In the database the values are saved correctly as shown below:

enter image description here

When I print the report in PDF format using XML Publisher I get the escaped HTML characters like this:

enter image description here

Is there a way to fix this and print the normal characters instead of the escaped ones?

Thanks a lot in advance

like image 651
MaVRoSCy Avatar asked May 28 '15 07:05

MaVRoSCy


1 Answers

Starting with Oracle 11g you are able to use the PL/SQL package UTL_I18N.

UTL_I18N is a set of services that provides additional globalization functionality for applications.

One of the relevant methods in this context is "UTL_I18N.UNESCAPE_REFERENCE":

SELECT UTL_I18N.UNESCAPE_REFERENCE('ABC < & "') FROM DUAL;

With this you will get an output like: ABC < & "

Here are some more information provided by Oracle: https://docs.oracle.com/database/121/ARPLS/u_i18n.htm#ARPLS71170

like image 60
Artem Stepin Avatar answered Oct 24 '22 14:10

Artem Stepin