From 90e152386a4f2949fbb443e44f579e77365c19ee Mon Sep 17 00:00:00 2001 From: Sam ONeill Date: Thu, 10 Feb 2022 22:07:26 +1300 Subject: [PATCH 1/3] refactors unicode character conversion --- js/app/util.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/js/app/util.js b/js/app/util.js index 9cef85a4..e0975e73 100644 --- a/js/app/util.js +++ b/js/app/util.js @@ -951,13 +951,10 @@ define([ * @param text * @returns {String} */ - let unicodeToString = (text) => { - let result = text.replace(/\\u[\dA-F]{4}/gi, - function (match) { - return String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16)); - }); - return result.substring(0, 2) == "u'" ? result.substring(2, result.length - 1) : result; - }; + const unicodeToString = (text) => { + const result = text.replace(/\\u[\dA-F]{4}/gi, (match) => String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16))) + return result.substring(0, 2) == "u'" ? result.substring(2, result.length - 1) : result; + } /** * polyfill for "passive" events From b1d3484416b96fbcd18074d1335d2e80b340d19a Mon Sep 17 00:00:00 2001 From: Sam ONeill Date: Thu, 10 Feb 2022 22:09:42 +1300 Subject: [PATCH 2/3] refactors unicode character conversion --- js/app/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/app/util.js b/js/app/util.js index e0975e73..9c6c8685 100644 --- a/js/app/util.js +++ b/js/app/util.js @@ -951,10 +951,10 @@ define([ * @param text * @returns {String} */ - const unicodeToString = (text) => { + const unicodeToString = (text) => { const result = text.replace(/\\u[\dA-F]{4}/gi, (match) => String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16))) return result.substring(0, 2) == "u'" ? result.substring(2, result.length - 1) : result; - } + } /** * polyfill for "passive" events From 29ed931bb06ace08fba2a96e02e85c42ae2fa062 Mon Sep 17 00:00:00 2001 From: Sam ONeill Date: Thu, 10 Feb 2022 22:16:40 +1300 Subject: [PATCH 3/3] refactors unicode character conversion --- js/app/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app/util.js b/js/app/util.js index 9c6c8685..6be9f832 100644 --- a/js/app/util.js +++ b/js/app/util.js @@ -953,7 +953,7 @@ define([ */ const unicodeToString = (text) => { const result = text.replace(/\\u[\dA-F]{4}/gi, (match) => String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16))) - return result.substring(0, 2) == "u'" ? result.substring(2, result.length - 1) : result; + return result.substring(0, 2) == "u'" ? result.substring(2, result.length - 1) : result } /**