Free cookie consent management tool by TermsFeed stripHtml() Function
stripHtml() Function

Function

stripHtml( html )

Changes the provided HTML string into a plain text string by converting <br>, <p>, and <div> to line breaks, stripping all other tags, and converting escaped characters into their display values.

Parameters

Keyword Type Description

html

Text

the html text to be "stripped" of tags and converted to plain text.

Returns

Text

Usage considerations

Handling for classes and styles

striphtml() will not convert <br>, <p>, and <div> tags to line breaks if they contain additional classes or styles. For example, <div class="test"> or <div style="align:center"> would not be converted to line breaks.

Examples

=stripHtml("<p>Click <b>Save</b>.</p>") returns Click Save.

Open in Github Built: Fri, Nov 10, 2023 (03:42:48 PM)

stripHtml() Function

FEEDBACK