mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-12 06:06:05 +10:00
Use start_with? instead of String slicing to check for external links
[ci skip]
This commit is contained in:
@@ -240,7 +240,7 @@ module ApplicationHelper
|
||||
# external links
|
||||
def link_to(name = nil, options = nil, html_options = {})
|
||||
if options.kind_of?(String)
|
||||
if options[0] != '/' && options[0] != '#'
|
||||
if !options.start_with?('#', '/')
|
||||
html_options = add_nofollow(options, html_options)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user