This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Looking for advice on my html escape function (or are there any pl sql apis for escaping html?) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Looking for advice on my html escape function (or are there any pl sql apis for escaping html?)" Watch "Looking for advice on my html escape function (or are there any pl sql apis for escaping html?)" New topic
Author

Looking for advice on my html escape function (or are there any pl sql apis for escaping html?)

Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

Hi

I am trying to escape html characters for html generated by pl sql (htp.p)

Here is what I have:

This is OK, but I would like to add in semi colons. Of course, if I don't escape the semi colon first, it starts replacing semi colons in the already escaped sequences - This is the same for the ampersand, which is why it is the first thing escaped. I haven't yet been able to come up with a way to do both without it starting to interfere with previously escaped characters.

Also, if anyone has any suggestion for already existing pl sql API's for this purpose, that would be great too,

I have looked at utl_url.escape - wrong escape format of course - took me too long to realize that ha
and also htf.escape_sc - this does not escape everything I need it to - but if you are familiar with this you will recognize my own function up there

Thanks


True wisdom is in knowing you know nothing - Socrates
 
 
subject: Looking for advice on my html escape function (or are there any pl sql apis for escaping html?)
 
Similar Threads
Execute pl/sql function which is having bind variables in java
Testing a simple Oracle PL SQL function using toad sql client?
Insert Unicode character