TagSpaces is an offline, open source, document manager with tagging support
fix 'maximum call stack size exceeded'
Borislav Sapundzhiev1d70ecc9b522
diff --git a/data/index.html b/data/index.htmlindex 1eb06afce..9e768702b 100644--- a/data/index.html+++ b/data/index.html@@ -5,7 +5,7 @@source code is governed by a AGPL3 license that can be found in the LICENSE file. --><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">- <meta http-equiv="Content-Security-Policy" content="default-src file: gap: ; frame-src 'self' file: gap: http: https: ; img-src 'self' data: ; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval'">+ <meta http-equiv="Content-Security-Policy" content="default-src file: gap: https:; frame-src 'self' file: gap: http: https: ; img-src 'self' data: ; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval'"><title>TagSpaces</title><style type="text/css">#loadingLogo {diff --git a/data/js/utils.js b/data/js/utils.jsindex 874292dfb..8c292dcfa 100644--- a/data/js/utils.js+++ b/data/js/utils.js@@ -40,11 +40,15 @@ define(function(require, exports, module) {return canvas.toDataURL("image/png");}- function arrayBufferToStr(buf) {- var s = String.fromCharCode.apply(null, new Uint8Array(buf));- return decodeURIComponent(escape(s));+ var arrayBufferToStr = function(buf) {+ var str = '',+ bytes = new Uint8Array(buf);+ for (var i = 0; i < bytes.length; i++) {+ str += String.fromCharCode(bytes[i]);+ }+ return decodeURIComponent(escape(str));}-+var baseName = function(dirPath) {var fileName = dirPath.substring(dirPath.lastIndexOf("/") + 1, dirPath.length);return fileName ? fileName : dirPath;