You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: