From 3f9da55adc9798bd66749dcdbd02fded8494fda3 Mon Sep 17 00:00:00 2001 From: Rin Toshaka Date: Sun, 30 Dec 2018 20:16:42 +0100 Subject: [PATCH] Fix formating. Aparently my pre-commit hook broke. --- lib/pleroma/html.ex | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/lib/pleroma/html.ex b/lib/pleroma/html.ex index f363ed85c..44b6776f9 100644 --- a/lib/pleroma/html.ex +++ b/lib/pleroma/html.ex @@ -38,8 +38,11 @@ defmodule Pleroma.HTML.Scrubber.TwitterText do require HtmlSanitizeEx.Scrubber.Meta alias HtmlSanitizeEx.Scrubber.Meta - - def version do 0 end + + def version do + 0 + end + Meta.remove_cdata_sections_before_scrub() Meta.strip_comments() @@ -77,7 +80,11 @@ defmodule Pleroma.HTML.Scrubber.Default do require HtmlSanitizeEx.Scrubber.Meta alias HtmlSanitizeEx.Scrubber.Meta - def version do 0 end + + def version do + 0 + end + @markup Application.get_env(:pleroma, :markup) @uri_schemes Application.get_env(:pleroma, :uri_schemes, []) @valid_schemes Keyword.get(@uri_schemes, :valid_schemes, []) @@ -154,8 +161,11 @@ defmodule Pleroma.HTML.Transform.MediaProxy do @moduledoc "Transforms inline image URIs to use MediaProxy." alias Pleroma.Web.MediaProxy - - def version do 0 end + + def version do + 0 + end + def before_scrub(html), do: html def scrub_attribute("img", {"src", "http" <> target}) do -- 2.45.2