text static method
Escape values for placement inside the contents of a HTML or XML element.
Returns a string where all characters &, < and > in the string
representation of value is replaced by its HTML entities.
The string representation is produced by invoking toString on the value.
If value is null, the empty string is returned.
Implementation
static String text(Object? value) {
if (value != null) {
var s = value.toString().replaceAll('&', '&');
s = s.replaceAll('<', '<');
s = s.replaceAll('>', '>');
return s;
} else {
return '';
}
}