mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
FIX: Strips spaces from the end of URLs
This commit is contained in:
parent
dbab628e16
commit
767048cc8d
@ -6,7 +6,7 @@ class TopicEmbed < ActiveRecord::Base
|
||||
validates_presence_of :embed_url
|
||||
|
||||
def self.normalize_url(url)
|
||||
url.downcase.sub(/\/$/, '').sub(/\-+/, '-')
|
||||
url.downcase.sub(/\/$/, '').sub(/\-+/, '-').strip
|
||||
end
|
||||
|
||||
def self.imported_from_html(url)
|
||||
|
Loading…
x
Reference in New Issue
Block a user