STRING::STRIP_HTML_TAGS 1g 2023-11-22 laplante@plcb.ca GOWEB/STRING — Remove HTML Tags from String


title: “STRING::STRIP_HTML_TAGS” version: “1.0.0” date: 2023-11-22 author: “laplante@plcb.ca” section: “1g” category: “GOWEB/STRING”


Name

string::strip_html_tags Remove HTML Tags from String

Synopsis

string::strip_html_tags(string[, string... , keeptags: bool, tags: [string,...]])
strip_html_tags(string[, string... , keeptags: bool, tags: [string,...]])
string::stripHtmlTags(string[, string... , keeptags: bool, tags: [string,...]])
stripHtmlTags(string[, string... , keeptags: bool, tags: [string,...]])

Description

The strip_html_tags function removes HTML tags from a string.

By default, all tags are removed unless a list of tags is provided in the tags parameter.

Parameters


Examples

res={{
    str := "<html><body><p>allo</p></body></html>";

    strip_html_tags(str, keeptags:true, tags:["p","/p"]); "\n";
    strip_html_tags(str, keeptags:false, tags:["p","/p"]);
}}.

Returns:

<p>allo</p>
<html><body>allo</body></html>

Author

laplante@plcb.ca

See Also


Version