Commit d77fd6b3 authored by lain's avatar lain
Browse files

Merge branch 'fix/html-title-load' into 'develop'

Fix title on load of Pleroma HTML, fixes #2281

Closes #2281

See merge request !3125
parents 4a3d1e78 e4a21084
Pipeline #32717 passed with stages
in 87 minutes and 30 seconds
......@@ -37,9 +37,11 @@ def redirector_with_meta(conn, params) do
tags = build_tags(conn, params)
preloads = preload_data(conn, params)
title = "<title>#{Pleroma.Config.get([:instance, :name])}</title>"
response =
index_content
|> String.replace(~r/<title>.+?<\/title>/, title)
|> String.replace("<!--server-generated-meta-->", tags <> preloads)
conn
......@@ -54,9 +56,11 @@ def redirector_with_preload(conn, %{"path" => ["pleroma", "admin"]}) do
def redirector_with_preload(conn, params) do
{:ok, index_content} = File.read(index_file_path())
preloads = preload_data(conn, params)
title = "<title>#{Pleroma.Config.get([:instance, :name])}</title>"
response =
index_content
|> String.replace(~r/<title>.+?<\/title>/, title)
|> String.replace("<!--server-generated-meta-->", preloads)
conn
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment