mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
FIX: Remove trailing slash from topic URL
this lead to duplicate slashes in concatenated URLs
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user