-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Adds create pr urls for other providers #4143
base: main
Are you sure you want to change the base?
Conversation
protected override getUrlForComparison(base: string, compare: string, _notation: '..' | '...'): string { | ||
return this.encodeUrl(`${this.baseUrl}/branches/compare/${base}%0D${compare}`).replace('%250D', '%0D'); | ||
protected override getUrlForComparison(base: string, head: string, _notation: '..' | '...'): string { | ||
return this.encodeUrl(`${this.baseUrl}/branches/compare/${base}%0D${head}`).replace('%250D', '%0D'); |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 8 days ago
To fix the problem, we need to ensure that all occurrences of the string '%250D'
are replaced in the URL. This can be achieved by using a regular expression with the global flag (g
) in the replace
method. This change will ensure that every instance of '%250D'
in the URL is replaced with '%0D'
.
-
Copy modified line R161
@@ -160,3 +160,3 @@ | ||
protected override getUrlForComparison(base: string, head: string, _notation: '..' | '...'): string { | ||
return this.encodeUrl(`${this.baseUrl}/branches/compare/${base}%0D${head}`).replace('%250D', '%0D'); | ||
return this.encodeUrl(`${this.baseUrl}/branches/compare/${base}%0D${head}`).replace(/%250D/g, '%0D'); | ||
} |
38021ba
to
f470126
Compare
f470126
to
d324a33
Compare
d324a33
to
2f19e0e
Compare
3c8f601
to
fcfae9b
Compare
Refs #4142