html: add the ability to override the default scrub policy
This commit is contained in:
parent
8eed5938d5
commit
95376ac1fe
@ -3,9 +3,13 @@ defmodule Pleroma.HTML do
|
|||||||
|
|
||||||
@markup Application.get_env(:pleroma, :markup)
|
@markup Application.get_env(:pleroma, :markup)
|
||||||
|
|
||||||
|
def filter_tags(html, scrubber) do
|
||||||
|
html |> Scrubber.scrub(scrubber)
|
||||||
|
end
|
||||||
|
|
||||||
def filter_tags(html) do
|
def filter_tags(html) do
|
||||||
scrubber = Keyword.get(@markup, :scrub_policy)
|
scrubber = Keyword.get(@markup, :scrub_policy)
|
||||||
html |> Scrubber.scrub(scrubber)
|
filter_tags(html, scrubber)
|
||||||
end
|
end
|
||||||
|
|
||||||
def strip_tags(html) do
|
def strip_tags(html) do
|
||||||
|
Loading…
Reference in New Issue
Block a user