html: add the ability to override the default scrub policy
authorWilliam Pitcock <nenolod@dereferenced.org>
Mon, 10 Sep 2018 00:33:44 +0000 (00:33 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Sun, 16 Sep 2018 01:25:35 +0000 (01:25 +0000)
lib/pleroma/html.ex

index 107784e70496219156c616e17561e0285a94fd3d..a0c43b82cb3757377602141704a0d6cdcda36f1b 100644 (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