escapeHtml function

String escapeHtml(
  1. String html, {
  2. bool escapeApos = true,
})

Escapes ("), (<), (>) and (&) characters. Escapes (') if escapeApos is true.

Implementation

String escapeHtml(String html, {bool escapeApos = true}) =>
    HtmlEscape(HtmlEscapeMode(
      escapeApos: escapeApos,
      escapeLtGt: true,
      escapeQuot: true,
    )).convert(html);