-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From parameter option added to BYOR data convert #818
Conversation
@@ -72,6 +72,16 @@ | |||
return string.slice(0, -1) | |||
} | |||
|
|||
let getParameterByName = function (name, url) { | |||
if (!url) url = window.location.href; | |||
name = name.replace(/[\[\]]/g, '\\$&'); |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 23 days ago
To fix the problem, we need to ensure that backslashes are also escaped in the name
parameter. This can be achieved by modifying the name.replace
method to include backslashes in the regular expression. We will use a regular expression with the g
flag to ensure that all occurrences of special characters, including backslashes, are replaced.
-
Copy modified line R77
@@ -76,3 +76,3 @@ | ||
if (!url) url = window.location.href; | ||
name = name.replace(/[\[\]]/g, '\\$&'); | ||
name = name.replace(/([[\]\\])/g, '\\$&'); | ||
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), |
No description provided.