mirror of
https://github.com/redmine/redmine.git
synced 2025-11-11 15:56:03 +01:00
Fix RuboCop offense Style/RedundantStringEscape (#36919).
git-svn-id: https://svn.redmine.org/redmine/trunk@21920 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -42,7 +42,7 @@ class URLTest < ActiveSupport::TestCase
|
||||
"mailto:foo@example.org",
|
||||
" http://example.com/",
|
||||
"",
|
||||
"/javascript:alert(\'filename\')",
|
||||
"/javascript:alert('filename')",
|
||||
]
|
||||
|
||||
def test_uri_with_link_safe_scheme_should_recognize_safe_uris
|
||||
@@ -52,18 +52,18 @@ class URLTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
LINK_UNSAFE_URIS = [
|
||||
"javascript:alert(\'XSS\');",
|
||||
"javascript :alert(\'XSS\');",
|
||||
"javascript: alert(\'XSS\');",
|
||||
"javascript : alert(\'XSS\');",
|
||||
":javascript:alert(\'XSS\');",
|
||||
"javascript:alert('XSS');",
|
||||
"javascript :alert('XSS');",
|
||||
"javascript: alert('XSS');",
|
||||
"javascript : alert('XSS');",
|
||||
":javascript:alert('XSS');",
|
||||
"javascript:",
|
||||
"javascript:",
|
||||
"javascript:",
|
||||
"javascript:",
|
||||
"java\0script:alert(\"XSS\")",
|
||||
"java\script:alert(\"XSS\")",
|
||||
" \x0e javascript:alert(\'XSS\');",
|
||||
" \x0e javascript:alert('XSS');",
|
||||
"data:image/png;base64,foobar",
|
||||
"vbscript:foobar",
|
||||
"data:text/html;base64,foobar",
|
||||
|
||||
Reference in New Issue
Block a user