FIX: Strips spaces from the end of URLs

This commit is contained in:
Robin Ward 2014-04-03 15:35:31 -04:00
parent dbab628e16
commit 767048cc8d
1 changed files with 1 additions and 1 deletions

View File

@ -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)