ci: add CodeQL workflow (#25443)

Co-authored-by: Liam DeBeasi <liamdebeasi@icloud.com>
This commit is contained in:
Lars Mikkelsen
2022-06-17 15:54:16 -04:00
committed by GitHub
parent 7483d9143a
commit 897bd4a8d0
5 changed files with 37 additions and 1 deletions

View File

@ -253,7 +253,7 @@ export class Platform {
}
const readQueryParam = (url: string, key: string) => {
key = key.replace(/[[]/, '\\[').replace(/[\]]/, '\\]');
key = key.replace(/[[\]\\]/g, '\\$&');
const regex = new RegExp('[\\?&]' + key + '=([^&#]*)');
const results = regex.exec(url);
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;