Package org.owasp.html
Class TagBalancingHtmlStreamEventReceiver
- java.lang.Object
-
- org.owasp.html.TagBalancingHtmlStreamEventReceiver
-
- All Implemented Interfaces:
HtmlStreamEventReceiver
public class TagBalancingHtmlStreamEventReceiver extends java.lang.Object implements HtmlStreamEventReceiver
Wraps an HTML stream event receiver to fill in missing close tags. If the balancer is given the HTML<p>1<p>2
, the wrapped receiver will see events equivalent to<p>1</p><p>2</p>
.- Author:
- Mike Samuel
-
-
Constructor Summary
Constructors Constructor Description TagBalancingHtmlStreamEventReceiver(HtmlStreamEventReceiver underlying)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeDocument()
void
closeTag(java.lang.String elementName)
void
openDocument()
void
openTag(java.lang.String elementName, java.util.List<java.lang.String> attrs)
void
setNestingLimit(int limit)
void
text(java.lang.String text)
-
-
-
Constructor Detail
-
TagBalancingHtmlStreamEventReceiver
public TagBalancingHtmlStreamEventReceiver(HtmlStreamEventReceiver underlying)
-
-
Method Detail
-
setNestingLimit
public void setNestingLimit(int limit)
-
openDocument
public void openDocument()
- Specified by:
openDocument
in interfaceHtmlStreamEventReceiver
-
closeDocument
public void closeDocument()
- Specified by:
closeDocument
in interfaceHtmlStreamEventReceiver
-
openTag
public void openTag(java.lang.String elementName, java.util.List<java.lang.String> attrs)
- Specified by:
openTag
in interfaceHtmlStreamEventReceiver
attrs
- alternating attribute names and values.
-
closeTag
public void closeTag(java.lang.String elementName)
- Specified by:
closeTag
in interfaceHtmlStreamEventReceiver
-
text
public void text(java.lang.String text)
- Specified by:
text
in interfaceHtmlStreamEventReceiver
-
-