htmlEscape function
Simple HTML escaping function
Implementation
String htmlEscape(String text) {
return text
.replaceAll('&', '&')
.replaceAll('<', '<')
.replaceAll('>', '>')
.replaceAll('"', '"')
.replaceAll("'", ''');
}