xssAPI.getValidHref returns empty if xssprotection/config.xml's anchor tag-rule is set to "filter" or "remove"
In the cq/xssprotection/config.xml I set the tag-rule for an anchor as "filter" or "remove" because we don't want to allow our content editors to insert links. From every input field we run the xssAPI.filterHTML() method. However, when set this way, the xssAPI.getValidHref() method that we use for authorized links always returns empty.
This allows getValidHref to work but allows links in unauthorized fields:
<tag name="a" action="validate">
<attribute name="href"/>
</tag>
This filters out unauthorized links, but doesn't allow getValidHref() to work:
<tag name="a" action="filter" /> or <tag name="a" action="remove" />
I'm looking to filter out anchor tags from almost all inputs, while at the same time, allow only valid paths for path selector inputs.
Any help would be greatly appreciated.