Better parsing of query string variables

This commit is contained in:
Giannis Kosmas 2014-05-05 23:23:48 +03:00
parent c77938efc9
commit d8c0953567
1 changed files with 1 additions and 1 deletions

View File

@ -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) {