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…
Reference in New Issue