summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel <samuel@cendio.se>2014-05-06 09:13:18 +0200
committerSamuel <samuel@cendio.se>2014-05-06 09:13:18 +0200
commitdd3a8a1b6dbd519406da2c07ac6c54df3f3f36c4 (patch)
treecd380363d05e49ac35d4391d0fdbc252f8b1e811
parentc77938efc9f52449c30018bf29422c1d590cdbdc (diff)
parentd8c09535679ebb60e09bb337c42fd542340a3814 (diff)
downloadnovnc-dd3a8a1b6dbd519406da2c07ac6c54df3f3f36c4.tar.gz
Merge pull request #363 from kosmasgiannis/query_parse
Better parsing of query string variables
-rw-r--r--include/webutil.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/webutil.js b/include/webutil.js
index 5ceccbe..e95fc80 100644
--- a/include/webutil.js
+++ b/include/webutil.js
@@ -78,7 +78,7 @@ WebUtil.dirObj = function (obj, depth, parent) {
// Read a query string variable
WebUtil.getQueryVar = function(name, defVal) {
- var re = new RegExp('[?][^#]*' + name + '=([^&#]*)'),
+ var re = new RegExp('.*[?&]' + name + '=([^&#]*)'),
match = document.location.href.match(re);
if (typeof defVal === 'undefined') { defVal = null; }
if (match) {