Fix the decoding of ?next=

This commit is contained in:
Ned Batchelder
2014-07-23 10:58:39 -04:00
committed by Anurag Ramdasan
parent dea5c7d3db
commit fec283366f

View File

@@ -54,8 +54,8 @@
var next = u.split("next=")[1];
if (next != undefined) {
// if next is undefined, decodeURI returns "undefined" causing a bad redirect.
next = decodeURI(next);
}
next = decodeURIComponent(next);
}
if (next && !isExternal(next)) {
location.href=next;
} else if(json.redirect_url){