Package org.htmlcleaner.conditional
Class TagNodeEmptyContentCondition
java.lang.Object
org.htmlcleaner.conditional.TagNodeEmptyContentCondition
- All Implemented Interfaces:
ITagNodeCondition
Checks if node is an inline 0r block element and has empty contents or white/non-breakable spaces only. Nodes that have
non-empty id attribute are considered to be non-empty, since they can be used in javascript scenarios.
Examples that should be pruned,
Examples of code that should NOT be pruned:
invalid input: '<'/td |
- no content but image tags do not have text content. invalid input: '<'table
- the first (empty) td is a placeholder so the second td is in the correct column hi
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private ITagInfoProvider
Removal of element from this set can affect layout too hard. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
ID_ATTRIBUTE_NAME
- See Also:
-
unsafeBlockElements
Removal of element from this set can affect layout too hard. -
tagInfoProvider
-
-
Constructor Details
-
TagNodeEmptyContentCondition
-
-
Method Details
-
satisfy
- Specified by:
satisfy
in interfaceITagNodeCondition
-
satisfy
-
hasIdAttributeSet
-