gov.llnl.babel.backend.html
Class LiteHtmlCheck

java.lang.Object
  extended by gov.llnl.babel.backend.html.LiteHtmlCheck

public class LiteHtmlCheck
extends java.lang.Object


Constructor Summary
LiteHtmlCheck()
           
 
Method Summary
static boolean isSafeUrl(java.lang.String url)
          Check if the string is a reference to a tag or a network protocol (e.g.
static boolean isValidHtmlLiteFrag(java.lang.String htmlfrag)
          Check if a string is a valid HTML lite fragment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiteHtmlCheck

public LiteHtmlCheck()
Method Detail

isSafeUrl

public static boolean isSafeUrl(java.lang.String url)
Check if the string is a reference to a tag or a network protocol (e.g. http, ftp, gopher, nntp, ...) as opposed to scripting language references. Presently, this just checks the start of the URL.


isValidHtmlLiteFrag

public static boolean isValidHtmlLiteFrag(java.lang.String htmlfrag)
Check if a string is a valid HTML lite fragment. HTML lite is a subset of XHTML with many of the basic formatting constructs that intentionally excludes embedded scripts, objects or potentially hostile content.