1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4 defmodule Pleroma.Web.Metadata do
7 @providers Pleroma.Config.get([__MODULE__, :providers], [])
9 def build_tags(params) do
10 Enum.reduce(@providers, "", fn parser, acc ->
13 |> parser.build_tags()
14 |> Enum.map(&to_tag/1)
15 |> Enum.map(&HTML.safe_to_string/1)
23 with {name, attrs, _content = []} <- data do
24 HTML.Tag.tag(name, attrs)
26 {name, attrs, content} ->
27 HTML.Tag.content_tag(name, content, attrs)
30 raise ArgumentError, message: "make_tag invalid args"