FIX: quoted private topic url respects subfolder install (#25643)

Fixes an issue where private topics that are quoted have an incorrectly formatted url when using a subfolder install.

This update returns a relative url that includes the base_path rather than a combination of base_url + base_path.
This commit is contained in:
David Battersby
2024-02-13 13:20:24 +08:00
committed by GitHub
parent 85001a27e9
commit d7dd871d9f
3 changed files with 20 additions and 2 deletions

View File

@ -92,7 +92,7 @@ module PrettyText
if topic && Guardian.new.can_see?(topic)
{ title: Rack::Utils.escape_html(topic.title), href: topic.url }
elsif topic
{ title: I18n.t("on_another_topic"), href: Discourse.base_url + topic.slugless_url }
{ title: I18n.t("on_another_topic"), href: topic.slugless_url }
end
end