X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=inline;f=lib%2Fpleroma%2Fweb%2Ffallback%2Fredirect_controller.ex;h=49f659cf0138035d1b8da31d9296ff8889c3cecc;hb=b3e4d813626608994b24224667904e7fdbf6b0be;hp=712991c1888d3e4deca00ac90502e47ffeb43c7e;hpb=88f6b61a5e31856eb4cee204adf3fc9a6ab78d76;p=akkoma
diff --git a/lib/pleroma/web/fallback/redirect_controller.ex b/lib/pleroma/web/fallback/redirect_controller.ex
index 712991c18..49f659cf0 100644
--- a/lib/pleroma/web/fallback/redirect_controller.ex
+++ b/lib/pleroma/web/fallback/redirect_controller.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Fallback.RedirectController do
@@ -41,8 +41,7 @@ defmodule Pleroma.Web.Fallback.RedirectController do
response =
index_content
- |> String.replace(~r/
.+?<\/title>/, title)
- |> String.replace("", tags <> preloads)
+ |> String.replace("", tags <> preloads <> title)
conn
|> put_resp_content_type("text/html")
@@ -56,12 +55,12 @@ defmodule Pleroma.Web.Fallback.RedirectController do
def redirector_with_preload(conn, params) do
{:ok, index_content} = File.read(index_file_path())
preloads = preload_data(conn, params)
+ tags = Metadata.build_static_tags(params)
title = "#{Pleroma.Config.get([:instance, :name])}"
response =
index_content
- |> String.replace(~r/.+?<\/title>/, title)
- |> String.replace("", preloads)
+ |> String.replace("", tags <> preloads <> title)
conn
|> put_resp_content_type("text/html")