aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-09-10 00:33:44 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-09-16 01:25:35 +0000
commit95376ac1fe7a4d4a30932c6d74ca06782ba7c50a (patch)
treef3ec138e969c39e67655ba785835449f09e0f3c6 /lib
parent8eed5938d5fb6cac9075d2b75b69d2c93316db01 (diff)
downloadpleroma-95376ac1fe7a4d4a30932c6d74ca06782ba7c50a.tar.gz
html: add the ability to override the default scrub policy
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/html.ex6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pleroma/html.ex b/lib/pleroma/html.ex
index 107784e70..a0c43b82c 100644
--- a/lib/pleroma/html.ex
+++ b/lib/pleroma/html.ex
@@ -3,9 +3,13 @@ defmodule Pleroma.HTML do
@markup Application.get_env(:pleroma, :markup)
+ def filter_tags(html, scrubber) do
+ html |> Scrubber.scrub(scrubber)
+ end
+
def filter_tags(html) do
scrubber = Keyword.get(@markup, :scrub_policy)
- html |> Scrubber.scrub(scrubber)
+ filter_tags(html, scrubber)
end
def strip_tags(html) do