1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.Metadata do
8 def build_tags(params) do
10 Pleroma.Web.Metadata.Providers.RestrictIndexing
11 | Pleroma.Config.get([__MODULE__, :providers], [])
14 Enum.reduce(providers, "", fn parser, acc ->
17 |> parser.build_tags()
18 |> Enum.map(&to_tag/1)
19 |> Enum.map(&HTML.safe_to_string/1)
27 with {name, attrs, _content = []} <- data do
28 HTML.Tag.tag(name, attrs)
30 {name, attrs, content} ->
31 HTML.Tag.content_tag(name, content, attrs)
34 raise ArgumentError, message: "make_tag invalid args"
38 def activity_nsfw?(%{data: %{"sensitive" => sensitive}}) do
39 Pleroma.Config.get([__MODULE__, :unfurl_nsfw], false) == false and sensitive
42 def activity_nsfw?(_) do