aboutsummaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
Diffstat (limited to 'priv')
-rw-r--r--priv/scrubbers/o_embed.ex18
1 files changed, 18 insertions, 0 deletions
diff --git a/priv/scrubbers/o_embed.ex b/priv/scrubbers/o_embed.ex
new file mode 100644
index 000000000..ac419f45d
--- /dev/null
+++ b/priv/scrubbers/o_embed.ex
@@ -0,0 +1,18 @@
+defmodule Pleroma.HTML.Scrubber.OEmbed do
+ @moduledoc """
+ Scrubs OEmbed HTML
+ """
+ require FastSanitize.Sanitizer.Meta
+ alias FastSanitize.Sanitizer.Meta
+
+ Meta.strip_comments()
+
+ Meta.allow_tag_with_these_attributes(:iframe, [
+ "width",
+ "height",
+ "src",
+ "allowfullscreen"
+ ])
+
+ Meta.strip_everything_not_covered()
+end