From 48b2c1f2bac6c487a06d7ebff1dd116a688de061 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 15 Nov 2022 14:36:06 +0100 Subject: [PATCH] don't fail if value is not yet a string --- source/Ox/js/Encoding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Ox/js/Encoding.js b/source/Ox/js/Encoding.js index 697f45e3..974108ac 100644 --- a/source/Ox/js/Encoding.js +++ b/source/Ox/js/Encoding.js @@ -244,7 +244,7 @@ Ox.decodeDeflate = function(string, callback) { (function() { function replace(string) { - return string.replace(/%(?![0-9A-Fa-f]{2})/g, '%25') + return string.toString().replace(/%(?![0-9A-Fa-f]{2})/g, '%25') .replace(/(%[0-9A-Fa-f]{2})+/g, function(match) { var hex = match.split('%').slice(1), ret; Ox.forEach(Ox.range(1, hex.length + 1), function(length) {