allow_tag_with_this_attribute_values only allows one entry from list #6

Open
opened 2022-06-12 15:23:50 +00:00 by ales · 0 comments
Member

Meta.allow_tag_with_this_attribute_values only allows one value from the list, not multiple values.
So if you want to allow multiple classes, you'll have to add the permutation of all possible values to the list:

I would expect this to work for <a class="a b">Link</a>

  Meta.allow_tag_with_this_attribute_values(:a, "class", ["a", "b"])

Instead, we would have to use:

  Meta.allow_tag_with_this_attribute_values(:a, "class", ["a", "b", "a b", "b a"]) 
Meta.allow_tag_with_this_attribute_values only allows one value from the list, not multiple values. So if you want to allow multiple classes, you'll have to add the permutation of all possible values to the list: I would expect this to work for ```<a class="a b">Link</a>``` ``` Meta.allow_tag_with_this_attribute_values(:a, "class", ["a", "b"]) ``` Instead, we would have to use: ``` Meta.allow_tag_with_this_attribute_values(:a, "class", ["a", "b", "a b", "b a"]) ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pleroma-elixir-libraries/fast_sanitize#6
No description provided.