diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/pleroma/html.ex | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/lib/pleroma/html.ex b/lib/pleroma/html.ex new file mode 100644 index 000000000..0ec73a91d --- /dev/null +++ b/lib/pleroma/html.ex @@ -0,0 +1,14 @@ +defmodule Pleroma.HTML do +  alias HtmlSanitizeEx.Scrubber + +  @markup Application.get_env(:pleroma, :markup) + +  def filter_tags(html) do +    scrubber = Keyword.get(@markup, :scrub_policy) +    html |> Scrubber.scrub(scrubber) +  end + +  def strip_tags(html) do +    html |> Scrubber.scrub(Scrubber.StripTags) +  end +end | 
