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.Preload do
9 def build_tags(_conn, params) do
11 Enum.reduce(Pleroma.Config.get([__MODULE__, :providers], []), %{}, fn parser, acc ->
14 |> parser.generate_terms()
15 |> Enum.map(fn {k, v} -> {k, Base.encode64(Jason.encode!(v))} end)
25 |> HTML.safe_to_string()
30 def build_script_tag(content) do
31 HTML.Tag.content_tag(:script, HTML.raw(content),
32 id: "initial-results",
33 type: "application/json"