diff options
| author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2022-11-27 21:24:44 +0000 |
|---|---|---|
| committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2022-11-27 21:24:44 +0000 |
| commit | 36789986c0b26a4f48ad13ccc5417ff22f85634c (patch) | |
| tree | 263c3104fce91e3f7c09c2f74f58203a6a937338 /priv | |
| parent | 3b289a164386b994965d73a3c8aa61dc93181240 (diff) | |
| parent | f6d55e1e7774492bb5b86b7d9bbc05ae9475eb4c (diff) | |
| download | pleroma-36789986c0b26a4f48ad13ccc5417ff22f85634c.tar.gz pleroma-36789986c0b26a4f48ad13ccc5417ff22f85634c.zip | |
Merge branch 'mergeback/2.4.5' into 'develop'
Mergeback: 2.4.5
See merge request pleroma/pleroma!3794
Diffstat (limited to 'priv')
| -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" ]) |
