Fix bug.
This commit is contained in:
parent
8ef1464c4b
commit
3b1b672cfe
|
@ -32,9 +32,10 @@ class WebLink
|
|||
temp_url = {}
|
||||
Site.first.in_use_locales.each do |locale|
|
||||
locale = locale.to_s
|
||||
temp_url[locale] = self.url_translations[locale]
|
||||
unless /https?:\/\/[\S]+/.match(self.url_translations[locale]) || self.url_translations[locale].blank?
|
||||
temp_url[locale] = 'http://' + self.url_translations[locale]
|
||||
tmp = self.url_translations[locale]
|
||||
temp_url[locale] = tmp
|
||||
unless tmp.match(/^http(s|):\/\//) || tmp.blank? || tmp.start_with?('/')
|
||||
temp_url[locale] = 'http://' + tmp
|
||||
end
|
||||
end
|
||||
self.url_translations = temp_url
|
||||
|
|
Loading…
Reference in New Issue