org.atmosphere.util
Class XSSHtmlFilter

java.lang.Object
  extended by org.atmosphere.util.XSSHtmlFilter
All Implemented Interfaces:
BroadcastFilter<String>

public class XSSHtmlFilter
extends Object
implements BroadcastFilter<String>

Simple BroadcastFilter which automatically filter HTML/HTTP character into proper value, like \n replace by <br>. Using this BroadcastFilter prevent XSS attack.

Author:
Jeanfrancois Arcand

Constructor Summary
XSSHtmlFilter()
           
 
Method Summary
 String filter(String message)
          Transform a message into a well formed HTML message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSSHtmlFilter

public XSSHtmlFilter()
Method Detail

filter

public String filter(String message)
Transform a message into a well formed HTML message.

Specified by:
filter in interface BroadcastFilter<String>
Parameters:
message - the message
Returns:
a well formed


Copyright © 2009 SUN Microsystems. All Rights Reserved.