fast_sanitize issueshttps://git.pleroma.social/pleroma/elixir-libraries/fast_sanitize/-/issues2019-10-29T17:56:46Zhttps://git.pleroma.social/pleroma/elixir-libraries/fast_sanitize/-/issues/1Add ability to use multiple sanitizers in one pass2019-10-29T17:56:46Zrinpatchrin+pleroma@patch.cxAdd ability to use multiple sanitizers in one passCurrently it is needed to decode/encode html multiple times if you wish to use more than one sanitizer, which is sub-optimal.Currently it is needed to decode/encode html multiple times if you wish to use more than one sanitizer, which is sub-optimal.https://git.pleroma.social/pleroma/elixir-libraries/fast_sanitize/-/issues/2Move the html encoder to a separate library2019-10-29T17:57:52Zrinpatchrin+pleroma@patch.cxMove the html encoder to a separate libraryhttps://git.pleroma.social/pleroma/elixir-libraries/fast_sanitize/-/issues/3Ability to match values by regex2020-10-13T19:08:36ZAlex GleasonAbility to match values by regexEg I would like the ability to do this:
```elixir
Meta.allow_tag_with_this_attribute_values(:code, "class", ["inline", ~r/language-(\w+)/])
```
This would allow us to have syntax highlighting from Earmark with namespaced classes.
Rela...Eg I would like the ability to do this:
```elixir
Meta.allow_tag_with_this_attribute_values(:code, "class", ["inline", ~r/language-(\w+)/])
```
This would allow us to have syntax highlighting from Earmark with namespaced classes.
Related: pleroma/pleroma#2002https://git.pleroma.social/pleroma/elixir-libraries/fast_sanitize/-/issues/4Strip anything not in a tag2021-03-10T10:39:30ZAlex GleasonStrip anything not in a tagI have some data like this: `blah blah blah <iframe src="..." />`
I can't seem to figure out how to strip the `blah blah blah ` part. Is that possible?I have some data like this: `blah blah blah <iframe src="..." />`
I can't seem to figure out how to strip the `blah blah blah ` part. Is that possible?https://git.pleroma.social/pleroma/elixir-libraries/fast_sanitize/-/issues/5Improve Documentation2022-02-23T17:28:59ZlainImprove DocumentationIt's pretty hard to figure out how to use this library without looking through the test suite or the usage in Pleroma.It's pretty hard to figure out how to use this library without looking through the test suite or the usage in Pleroma.https://git.pleroma.social/pleroma/elixir-libraries/fast_sanitize/-/issues/6allow_tag_with_this_attribute_values only allows one entry from list2022-06-12T15:23:50Za ballow_tag_with_this_attribute_values only allows one entry from listMeta.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...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"])
```