Skip to content

Commit

Permalink
Made getEnforcedAttributes public
Browse files Browse the repository at this point in the history
  • Loading branch information
jhy committed Oct 18, 2023
1 parent 8a59792 commit 7a83ffe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/org/jsoup/safety/Safelist.java
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,12 @@ private boolean isValidAnchor(String value) {
return value.startsWith("#") && !value.matches(".*\\s.*");
}

Attributes getEnforcedAttributes(String tagName) {
/**
Gets the Attributes that should be enforced for a given tag
* @param tagName the tag
* @return the attributes that will be enforced; empty if none are set for the given tag
*/
public Attributes getEnforcedAttributes(String tagName) {
Attributes attrs = new Attributes();
TagName tag = TagName.valueOf(tagName);
if (enforcedAttributes.containsKey(tag)) {
Expand Down

0 comments on commit 7a83ffe

Please sign in to comment.