Skip to content

Function: htmlFragmentToText()

htmlFragmentToText(html): string

Strip tags and decode entities from a short HTML fragment, collapsing all whitespace to single spaces. For inline snippets (a search result title or summary), where layout carries no meaning.

string

string