mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Don't add a slug to constructed quote urls (#12052)
A topic with the slug 'topic' might exist and may end up being linked to by mistake when malformed (i.e. cross-site) quotes are posted.
This commit is contained in:
committed by
GitHub
parent
578f753a13
commit
df8436cd7f
@@ -333,7 +333,7 @@ module PrettyText
|
||||
# extract quotes
|
||||
doc.css("aside.quote[data-topic]").each do |aside|
|
||||
if aside["data-topic"].present?
|
||||
url = +"/t/topic/#{aside["data-topic"]}"
|
||||
url = +"/t/#{aside["data-topic"]}"
|
||||
url << "/#{aside["data-post"]}" if aside["data-post"].present?
|
||||
links << DetectedLink.new(url, true)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user