public static String entityEncode ( String text ) { String result = text ; if ( result == null ) { return result ; } // The escapeXml function doesn't cope with some 'special' chrs return StringEscapeUtils . escapeXml10 ( XMLStringUtil . escapeControlChrs ( result ) ) ; }
Encode entity for HTML or XML output .