Drop HTMLSanitizeEx and fix title sanitizing

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-06-24 16:33:59 +02:00
parent 0f489757f7
commit 83aa005faf
12 changed files with 40 additions and 17 deletions

View File

@@ -14,5 +14,15 @@ defmodule Mobilizon.Service.Formatter.HTML do
def filter_tags(html), do: Sanitizer.scrub(html, DefaultScrubbler)
def strip_tags(html) do
case FastSanitize.strip_tags(html) do
{:ok, html} ->
html
_ ->
raise "Failed to filter tags"
end
end
def filter_tags_for_oembed(html), do: Sanitizer.scrub(html, OEmbed)
end