[Fix #1302] sanitize_url can deal with nil values
This commit is contained in:
parent
859de6168b
commit
d945001e0a
2 changed files with 23 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue