Skip to main content
Module

x/core/mod.ts>stripHtml

Some auxiliary functions and classes of deno.
Latest
function stripHtml
import { stripHtml } from "https://deno.land/x/core@0.1.9/mod.ts";

Strip html tags

  1. Identify complete tag matches, e.g. "b" tag will not match "br", "body".
  2. Identify empty tags, e.g. "<>" will not be striped.
  3. Identify the start and end tag cannot be spaces, e.g. "a < b and c > d" will not be striped.

Parameters

html: string
optional
ignoredTags: Array<string> = [UNSUPPORTED]

Returns

string