org.openbp.common.markup
Class HTMLEscapeHelper

java.lang.Object
  extended by org.openbp.common.markup.HTMLEscapeHelper

public final class HTMLEscapeHelper
extends java.lang.Object

HTML-related utilities, i\.e\. to convert convert regular text to HTML text.


Method Summary
static java.lang.String htmlescape(java.lang.String s)
          Turns funky characters into HTML entity equivalents e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

htmlescape

public static java.lang.String htmlescape(java.lang.String s)
Turns funky characters into HTML entity equivalents

e.g. "bread" & "butter" => "bread" & "butter". Supports nearly all HTML entities, including funky accents. See the source code for more detail. In addition, "\n" characters will be converted to HTML line breaks and "\t" to 4 non-breaking spaces.

Parameters:
s - String to escape
Returns:
Escaped string


Copyright © 2011. All Rights Reserved.