Skip to content

Commit

Permalink
ACS-5397 Corrected checking whitespace characters in regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksanderSklorz committed Jun 26, 2023
1 parent 970ceeb commit a6b8e3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/src/lib/common/services/cookie.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class CookieService {
* @returns The cookie data or null if it is not found
*/
getItem(key: string): string | null {
const regexp = new RegExp('(?:' + key + '|;\s*' + key + ')=(.*?)(?:;|$)', 'g');
const regexp = new RegExp('(?:' + key + '|;\\s*' + key + ')=(.*?)(?:;|$)', 'g');
const result = regexp.exec(document.cookie);
return (result === null) ? null : result[1];
}
Expand Down

0 comments on commit a6b8e3b

Please sign in to comment.