aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/html.ex
diff options
context:
space:
mode:
authorhref <href@random.sh>2018-11-06 19:34:57 +0100
committerhref <href@random.sh>2018-11-06 19:41:15 +0100
commit5bb88fd1749931e755157760ec833c5d50ebb8c8 (patch)
treea43e1d2cb7812bd8df741203126e1ca12052c058 /lib/pleroma/html.ex
parent25512aa29cae22b73ee45a22954693c1a130ea3e (diff)
downloadpleroma-5bb88fd1749931e755157760ec833c5d50ebb8c8.tar.gz
Runtime configuration
Related to #85 Everything should now be configured at runtime, with the exception of the `Pleroma.HTML` scrubbers (the scrubbers used can be changed at runtime, but their configuration is compile-time) because it's building a module with a macro.
Diffstat (limited to 'lib/pleroma/html.ex')
-rw-r--r--lib/pleroma/html.ex4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/pleroma/html.ex b/lib/pleroma/html.ex
index 00b26963d..1b920d7fd 100644
--- a/lib/pleroma/html.ex
+++ b/lib/pleroma/html.ex
@@ -1,14 +1,12 @@
defmodule Pleroma.HTML do
alias HtmlSanitizeEx.Scrubber
- @markup Application.get_env(:pleroma, :markup)
-
defp get_scrubbers(scrubber) when is_atom(scrubber), do: [scrubber]
defp get_scrubbers(scrubbers) when is_list(scrubbers), do: scrubbers
defp get_scrubbers(_), do: [Pleroma.HTML.Scrubber.Default]
def get_scrubbers() do
- Keyword.get(@markup, :scrub_policy)
+ Pleroma.Config.get([:markup, :scrub_policy])
|> get_scrubbers
end