escapeMp function

String escapeMp(
  1. dynamic strings
)

Escapes the following characters in the given string argument: & < > " '

Implementation

String escapeMp(strings) {
  if (strings.runtimeType == String) {
    return _htmlEscape(strings);
  }

  var output = strings[0];
  if (strings.runtimeType == List) {
    for (var index = 0; index <= (strings as List).length; index++) {
      output = output + _htmlEscape(strings[index] + strings[index + 1]);
    }
  }

  return output;
}