mobilizon/lib/service/formatter/html.ex
Thomas Citharel 4144e9ffd0
Introduce group basic federation, event new page and notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-06-03 16:01:26 +02:00

19 lines
602 B
Elixir

# Portions of this file are derived from Pleroma:
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social>
# SPDX-License-Identifier: AGPL-3.0-only
# Upstream: https://git.pleroma.social/pleroma/pleroma/blob/develop/lib/pleroma/html.ex
defmodule Mobilizon.Service.Formatter.HTML do
@moduledoc """
Service to filter tags out of HTML content.
"""
alias FastSanitize.Sanitizer
alias Mobilizon.Service.Formatter.{DefaultScrubbler, OEmbed}
def filter_tags(html), do: Sanitizer.scrub(html, DefaultScrubbler)
def filter_tags_for_oembed(html), do: Sanitizer.scrub(html, OEmbed)
end