diff options
author | Ekaterina Vaartis <vaartis@kotobank.ch> | 2022-12-20 21:00:07 +0300 |
---|---|---|
committer | Ekaterina Vaartis <vaartis@kotobank.ch> | 2022-12-20 21:00:07 +0300 |
commit | 398141da68328cea982f017a3e8bc95a9f9c1fbf (patch) | |
tree | fa66f1417d86de3665a854fbbbf4b01987e5a51d /priv/scrubbers | |
parent | 5a39866388c411f2bcee9848352f8c420513f34f (diff) | |
parent | 5910d58cf7f468722b3774622b6b40a07b5d6444 (diff) | |
download | pleroma-398141da68328cea982f017a3e8bc95a9f9c1fbf.tar.gz pleroma-398141da68328cea982f017a3e8bc95a9f9c1fbf.zip |
Merge remote-tracking branch 'upstream/develop' into meilisearch
Diffstat (limited to 'priv/scrubbers')
-rw-r--r-- | priv/scrubbers/default.ex | 3 | ||||
-rw-r--r-- | priv/scrubbers/twitter_text.ex | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/priv/scrubbers/default.ex b/priv/scrubbers/default.ex index 79fa6dcdf..e10e3ec87 100644 --- a/priv/scrubbers/default.ex +++ b/priv/scrubbers/default.ex @@ -68,13 +68,14 @@ defmodule Pleroma.HTML.Scrubber.Default do @allow_inline_images Pleroma.Config.get([:markup, :allow_inline_images]) if @allow_inline_images do + Meta.allow_tag_with_this_attribute_values(:img, "class", ["emoji"]) + # restrict img tags to http/https only, because of MediaProxy. Meta.allow_tag_with_uri_attributes(:img, ["src"], ["http", "https"]) Meta.allow_tag_with_these_attributes(:img, [ "width", "height", - "class", "title", "alt" ]) diff --git a/priv/scrubbers/twitter_text.ex b/priv/scrubbers/twitter_text.ex index a121a8209..6e23b3efb 100644 --- a/priv/scrubbers/twitter_text.ex +++ b/priv/scrubbers/twitter_text.ex @@ -45,13 +45,14 @@ defmodule Pleroma.HTML.Scrubber.TwitterText do # allow inline images for custom emoji if Pleroma.Config.get([:markup, :allow_inline_images]) do + Meta.allow_tag_with_this_attribute_values(:img, "class", ["emoji"]) + # restrict img tags to http/https only, because of MediaProxy. Meta.allow_tag_with_uri_attributes(:img, ["src"], ["http", "https"]) Meta.allow_tag_with_these_attributes(:img, [ "width", "height", - "class", "title", "alt" ]) |