mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 02:17:19 +00:00
hashchange: Handle trailing slashes in narrowing URLs.
Fixes #9305. Empty operators are not allowed while parsing narrowing URLs. `parse_narrow` stops parsing further if it encounters an empty string operator.
This commit is contained in:
committed by
Tim Abbott
parent
83ee8211a8
commit
f0d874d51f
@@ -77,6 +77,11 @@ exports.parse_narrow = function (hash) {
|
||||
// but the user might write one.
|
||||
try {
|
||||
var operator = hash_util.decodeHashComponent(hash[i]);
|
||||
// Do not parse further if empty operator encountered.
|
||||
if (operator === '') {
|
||||
break;
|
||||
}
|
||||
|
||||
var operand = hash_util.decode_operand(operator, hash[i+1] || '');
|
||||
var negated = false;
|
||||
if (operator[0] === '-') {
|
||||
|
||||
Reference in New Issue
Block a user