Package org.htmlcleaner
Class TrimAttributeTagTransformation
- java.lang.Object
-
- org.htmlcleaner.TagTransformation
-
- org.htmlcleaner.TrimAttributeTagTransformation
-
public class TrimAttributeTagTransformation extends org.htmlcleaner.TagTransformation
This class allows to transform all tags attribute to trim their value from leading space, except for input value. It applies the original tag transformations, and then iterates over the attributes to remove the leading spaces. This class aims at being deleted once HtmlCleaner offers a way to have a better control over trimAttribute flag, see: https://sourceforge.net/p/htmlcleaner/bugs/213/. Note: Even though in a public package this code is not meant to be a public API. We've had to put in under theorg.htmlcleaner
package because we use the following package protected API: TagTransformation#getSourceTag().- Since:
- 11.1RC1
- Version:
- $Id: f8805037b08432a86c5545f93ff35465705af6a2 $
-
-
Constructor Summary
Constructors Constructor Description TrimAttributeTagTransformation(String sourceTag, String destTag)
Create aTagTransformation
from source tag to target tag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
applyTagTransformations(Map<String,String> attributes)
-
-
-
Constructor Detail
-
TrimAttributeTagTransformation
public TrimAttributeTagTransformation(String sourceTag, String destTag)
Create aTagTransformation
from source tag to target tag. This kind of transformation always preserve the attributes.- Parameters:
sourceTag
- Name of the tag to be transformed.destTag
- Name of tag to which source tag is to be transformed.
-
-