cleanHtmlString method

String cleanHtmlString(
  1. String html
)

Implementation

String cleanHtmlString(String html) {
  // Remove \n and replace \/ with /
  String cleaned =
      html.replaceAll(RegExp(r'\n'), '').replaceAll(RegExp(r'\/'), '/');

  cleaned = cleaned.split('<script')[0];
  return cleaned;
}