From 767048cc8dfa1338f0e3e1beee7d8b651922bfde Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 3 Apr 2014 15:35:31 -0400 Subject: [PATCH] FIX: Strips spaces from the end of URLs --- app/models/topic_embed.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/topic_embed.rb b/app/models/topic_embed.rb index a1ea9f5a0d6..96a06397dd3 100644 --- a/app/models/topic_embed.rb +++ b/app/models/topic_embed.rb @@ -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)