stripHtml static method

String stripHtml(
  1. String html
)

Strip HTML tags from template output (basic sanitization).

Removes patterns, useful for displaying in plain text widgets.

Implementation

static String stripHtml(String html) {
  return html.replaceAll(RegExp(r'<[^>]*>'), '');
}