mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 04:29:29 +08:00
FIX: Remove trailing slash from topic URL
this lead to duplicate slashes in concatenated URLs
This commit is contained in:
parent
df18243827
commit
53d2232731
|
@ -1001,7 +1001,7 @@ class Topic < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def self.url(id, slug, post_number = nil)
|
||||
url = +"#{Discourse.base_url}/t/#{slug}/#{id}/"
|
||||
url = +"#{Discourse.base_url}/t/#{slug}/#{id}"
|
||||
url << "/#{post_number}" if post_number.to_i > 1
|
||||
url
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user