html: add the ability to override the default scrub policy

This commit is contained in:
William Pitcock 2018-09-10 00:33:44 +00:00
parent 8eed5938d5
commit 95376ac1fe
1 changed files with 5 additions and 1 deletions

View File

@ -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