How to escape <, >, and & characters to html entities in Oracle PL/SQL

Posted by SWilk on Stack Overflow See other posts from Stack Overflow or by SWilk
Published on 2010-06-16T12:13:11Z Indexed on 2010/06/16 13:42 UTC
Read the original article Hit count: 256

Filed under:
|
|
|

Hi,

I need to send HTML emails directly from oracle PL/SQL package. This works almost fine.

I have problem with the fact that some of the data fetched from a table contain things like <S>, <L>, and similar fragments, which sometimes ar treated as HTML tags, and even if not, they are always ignored and never displayed.

So, I need to escape this column before inserting into email body.

Is there a function to escape html special chars into entities automaticly? Or do I need to replace('<','&lt;',string) manually all the special characters?

I found a function to escape URLs but not one for HTML :(

Best regards, SWilk

© Stack Overflow or respective owner

Related posts about html

Related posts about Oracle