Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
e4a21084
Commit
e4a21084
authored
Nov 08, 2020
by
Sean King
Browse files
Fix title on load of Pleroma HTML
parent
294628d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/fallback/redirect_controller.ex
View file @
e4a21084
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment