mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FIX: Strips spaces from the end of URLs
This commit is contained in:
parent
dbab628e16
commit
767048cc8d
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue