class_body
{ "{"
field_declaration
modifiers
private "private"
generic_type
type_identifier "Set"
type_arguments
< "<"
type_identifier "TagName"
> ">"
variable_declarator
identifier "tagNames"
; ";"
line_comment "// tags allowed, lower case. e.g. [p, br, span]"
field_declaration
modifiers
private "private"
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "TagName"
, ","
generic_type
type_identifier "Set"
type_arguments
< "<"
type_identifier "AttributeKey"
> ">"
> ">"
variable_declarator
identifier "attributes"
; ";"
line_comment "// tag -> attribute[]. allowed attributes [href] for a tag."
field_declaration (+21 nodes collapsed)
line_comment "// always set these attribute values"
field_declaration (+26 nodes collapsed)
line_comment "// allowed URL protocols for attributes"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "preserveRelativeLinks"
; ";"
line_comment "// option to preserve relative links"
block_comment "/**\n This whitelist allows only text nodes: all HTML wil"...
method_declaration (+21 nodes collapsed)
block_comment "/**\n This whitelist allows only simple text formatting: "...
method_declaration (+51 nodes collapsed)
block_comment "/**\n This whitelist allows a fuller range of text nodes:"...
method_declaration (+291 nodes collapsed)
block_comment "/**\n This whitelist allows the same text tags as {@link "...
method_declaration (+95 nodes collapsed)
block_comment "/**\n This whitelist allows a full range of text and stru"...
method_declaration (+601 nodes collapsed)
block_comment "/**\n Create a new, empty whitelist. Generally it will be"...
constructor_declaration (+110 nodes collapsed)
block_comment "/**\n Add a list of allowed elements to a whitelist. (If "...
method_declaration (+68 nodes collapsed)
block_comment "/**\n Add a list of allowed attributes to a tag. (If an a"...
method_declaration (+179 nodes collapsed)
block_comment "/**\n Add an enforced attribute to a tag. An enforced att"...
method_declaration (+187 nodes collapsed)
block_comment "/**\n * Configure this Whitelist to preserve relative lin"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n Add allowed URL protocols for an element's URL attr"...
method_declaration (+296 nodes collapsed)
method_declaration (+30 nodes collapsed)
method_declaration (+217 nodes collapsed)
method_declaration
modifiers
private "private"
boolean_type "boolean"
identifier "testValidProtocol"
formal_parameters
( "("
formal_parameter
type_identifier "Element"
identifier "el"
, ","
formal_parameter
type_identifier "Attribute"
identifier "attr"
, ","
formal_parameter
generic_type
type_identifier "Set"
type_arguments
< "<"
type_identifier "Protocol"
> ">"
identifier "protocols"
) ")"
block
{ "{"
line_comment "// try to resolve relative urls to abs, and optionally updat"...
line_comment "// rels without a baseuri get removed"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "value"
= "="
method_invocation
identifier "el"
. "."
identifier "absUrl"
argument_list
( "("
method_invocation
identifier "attr"
. "."
identifier "getKey"
argument_list
( "("
) ")"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
identifier "preserveRelativeLinks"
) ")"
expression_statement
method_invocation
identifier "attr"
. "."
identifier "setValue"
argument_list
( "("
identifier "value"
) ")"
; ";"
enhanced_for_statement (+56 nodes collapsed)
return_statement
return "return"
false "false"
; ";"
} "}"
method_declaration (+142 nodes collapsed)
line_comment "// named types for config. All just hold strings, but here f"...
class_declaration (+53 nodes collapsed)
class_declaration (+53 nodes collapsed)
class_declaration (+53 nodes collapsed)
class_declaration (+53 nodes collapsed)
class_declaration (+265 nodes collapsed)
} "}"