26.27 STRIPHTML Function Signature 2
This function returns p_string
(CLOB) removing HTML tags, leaving plain text.
This function removes all HTML attributes regardless of the type of HTML content. For example, it preserves content such as JavaScript and CSS, but removes script and CSS HTML tags.
Syntax
APEX_ESCAPE.STRIPHTML (
p_string IN CLOB )
RETURN CLOB deterministic;
Parameters
Parameter | Description |
---|---|
p_string |
The input text string. |
Example
BEGIN
sys.htp.p(apex_escape.striphtml(
q'[<p id="greeting">Hello <b>Joe</b></p>]'
));
END;
Result:
---------------------------------------------------------------------------
Hello Joe
---------------------------------------------------------------------------
BEGIN
sys.htp.p(apex_escape.striphtml(q'[
<html>
<head>
<title>Web Page</title>
</head>
<body>
<h1>Page Title</h1>
<p>
This is some text.
</p>
</body>
</html>
]'));
END;
Result:
---------------------------------------------------------------------------
Web Page
Page Title
This is some text.
Parent topic: APEX_ESCAPE