For example, you can use the htf.escape_sc function:
SQL> select htf.escape_sc('Please escape <this> tag') from dual; HTF.ESCAPE_SC('PLEASEESCAPE<THIS>TAG') ------------------------------------------------------------------ Please escape <this> tag
1. htf.escape_sc
This replaces characters that have special meaning in HTML with their escape sequences. The following characters are converted:
- & to & " to ": < to < > to >
The procedure version of this subprogram does the same thing as htp.prints and htp.ps.
| Syntax: | htf.escape_sc(ctext in varchar2) return varchar2;
htp.escape_sc(ctext in varchar2); |
| Parameters: | |
| Generates: | The converted string. |
2. htf.escape_url
This replaces characters that have special meaning in HTML and HTTP with their escape sequences. The following characters are converted: & to & " to " < to < > to > % to %25
| Syntax: | htf.escape_url(p_url in varchar2) return varchar2; |
| Parameters: | |
| Generates: | The converted string. |
转载自:https://sites.google.com/site/oracleworkstation/blog/oraclehtfescapesc
本文介绍了Oracle数据库中HTF包提供的两个用于字符串转义的函数:escape_sc和escape_url。escape_sc用于替换在HTML中有特殊意义的字符为对应的转义序列,而escape_url则进一步考虑了HTTP中的特殊字符。
533

被折叠的 条评论
为什么被折叠?



