Skip to content

Commit

Permalink
[ACS-5397] Corrected checking whitespace characters in regexp (#8704)
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksanderSklorz committed Jun 27, 2023
1 parent be896b5 commit 9dd9347
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 9dd9347

Please sign in to comment.