1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 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
9 Enum.reduce(Pleroma.Config.get([__MODULE__, :providers], []), "", fn parser, acc ->
12 |> parser.build_tags()
13 |> Enum.map(&to_tag/1)
14 |> Enum.map(&HTML.safe_to_string/1)
22 with {name, attrs, _content = []} <- data do
23 HTML.Tag.tag(name, attrs)
25 {name, attrs, content} ->
26 HTML.Tag.content_tag(name, content, attrs)
29 raise ArgumentError, message: "make_tag invalid args"
33 def activity_nsfw?(%{data: %{"sensitive" => sensitive}}) do
34 Pleroma.Config.get([__MODULE__, :unfurl_nsfw], false) == false and sensitive
37 def activity_nsfw?(_) do