mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-5397] Corrected checking whitespace characters in regexp (#8704)
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
Reference in New Issue
Block a user