Skip to content

Index out of bound when empty list is passed to allowAttributes(...).globally() #300

Closed
@1003n40

Description

@1003n40

When using the HtmlPolicyBuilder and especially .allowAttributes(...).globally(), but I pass empty attributes it returns IndexOutOfBoundException. That is most probably caused by the globally() method which always tries to get the 0 element which may be passed or may not.

Looking at this I have spotted another bug, which is related to that where the style attribute could be located anywhere in the list, not as the first element, which currently is expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions