From 471c8cc094bdeed5bd82e49285736c6f64cf88d2 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Fri, 20 Mar 2020 09:53:44 -0400 Subject: [PATCH] fixup url decoding --- js/kiri.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/kiri.js b/js/kiri.js index 08d69ccb..fd06e0fa 100644 --- a/js/kiri.js +++ b/js/kiri.js @@ -371,8 +371,9 @@ self.kiri.copyright = exports.COPYRIGHT; function parseOpt(ov) { var opt = {}, kv, kva; - ov.split(',').forEach(function(el) { - kv = el.split(':'); + // handle kiri legacy and proper url encoding better + ov.split(',').map(v => v.split('&')).flat(1).forEach(function(el) { + kv = decodeURIComponent(el).split(':'); if (kv.length === 2) { kva = opt[kv[0]] = opt[kv[0]] || []; kva.push(decodeURIComponent(kv[1]));