Commit 30a04859 authored by Thimo Kraemer's avatar Thimo Kraemer

Correctly escaped regexp

parent fcb89ec7
/* /*
* KSS-RPC v0.8-beta * KSS-RPC v0.9-beta
* *
* Copyright (c) 2017, joonis new media * Copyright (c) 2017, joonis new media
* Author: Thimo Kraemer <thimo.kraemer@joonis.de> * Author: Thimo Kraemer <thimo.kraemer@joonis.de>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
******************************************************************************************/ ******************************************************************************************/
var kss = { var kss = {
version: '0.8-beta', version: '0.9-beta',
_initialized: false, _initialized: false,
_ruleSheets: {}, _ruleSheets: {},
_eventBinders: {}, _eventBinders: {},
...@@ -2192,7 +2192,7 @@ kss.openURL = function(href, _options) { ...@@ -2192,7 +2192,7 @@ kss.openURL = function(href, _options) {
}; };
kss.getCookie = function(name) { kss.getCookie = function(name) {
var regex = new RegExp('(^|;)\s*' + name + '\s*=([^;]*)'); var regex = new RegExp('(^|;)\\s*' + name + '\\s*=([^;]*)');
var match = document.cookie.match(regex); var match = document.cookie.match(regex);
if (match) if (match)
return match[2].trim(); return match[2].trim();
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment