[Fix #1302] sanitize_url can deal with nil values

This commit is contained in:
Mathieu Magnin 2018-01-18 17:24:21 +01:00
parent 859de6168b
commit d945001e0a
2 changed files with 23 additions and 1 deletions

View file

@ -2,7 +2,9 @@ module ApplicationHelper
include SanitizeUrl
def sanitize_url(url)
super(url, schemes: ['http', 'https'], replace_evil_with: root_url)
if !url.nil?
super(url, schemes: ['http', 'https'], replace_evil_with: root_url)
end
end
def flash_class(level)