summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2023-05-26 18:26:40 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2023-05-26 18:26:40 +0000
commitcd9d6a12abb745f6a060434c13ca6d85f43a4e02 (patch)
tree9fb66480b33864276d32d2674c4f0233496a553a /lib
parent47e66c950090c7be4bbd99303c33d7b5c0422ad0 (diff)
parent0d68804aa7efc4f3212e02218804755da93d03f0 (diff)
downloadpleroma-cd9d6a12abb745f6a060434c13ca6d85f43a4e02.tar.gz
pleroma-cd9d6a12abb745f6a060434c13ca6d85f43a4e02.zip
Merge branch 'issue/3126' into 'develop'
Filter OEmbed HTML tags See merge request pleroma/pleroma!3891
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/rich_media/parsers/o_embed.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/rich_media/parsers/o_embed.ex b/lib/pleroma/web/rich_media/parsers/o_embed.ex
index 75318d9c7..0f303176c 100644
--- a/lib/pleroma/web/rich_media/parsers/o_embed.ex
+++ b/lib/pleroma/web/rich_media/parsers/o_embed.ex
@@ -6,8 +6,8 @@ defmodule Pleroma.Web.RichMedia.Parsers.OEmbed do
def parse(html, _data) do
with elements = [_ | _] <- get_discovery_data(html),
oembed_url when is_binary(oembed_url) <- get_oembed_url(elements),
- {:ok, oembed_data} <- get_oembed_data(oembed_url) do
- oembed_data
+ {:ok, oembed_data = %{"html" => html}} <- get_oembed_data(oembed_url) do
+ %{oembed_data | "html" => Pleroma.HTML.filter_tags(html)}
else
_e -> %{}
end