Hello,
I am using this library, I am stuck at one point. I want to know after defining the policy, how can I again customize it. Like I want to add more attributes and elements after defining it.
for e.g. the defined policy is
PolicyFactory POLICY_DEFINITION = new HtmlPolicyBuilder()
.allowAttributes(allowAttributesGlobally).globally()
.allowAttributes("src").onElements("img", "script", "iframe")
.allowAttributes("href").onElements("a")
.allowElements("a", "img", "script", "iframe")
.toFactory();
now I want to add 'link' attribute of 'body' tag and 'onload' attribute of 'a' tag. How can I add these after defining the policy
Hello, I am using this library, I am stuck at one point. I want to know after defining the policy, how can I again customize it. Like I want to add more attributes and elements after defining it. for e.g. the defined policy is PolicyFactory POLICY_DEFINITION = new HtmlPolicyBuilder() .allowAttributes(allowAttributesGlobally).globally() .allowAttributes("src").onElements("img", "script", "iframe") .allowAttributes("href").onElements("a") .allowElements("a", "img", "script", "iframe") .toFactory();
now I want to add 'link' attribute of 'body' tag and 'onload' attribute of 'a' tag. How can I add these after defining the policy