From 528b475429bf1ad83edc23e24dbe25e1bc2774a1 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 14 Jul 2021 15:28:38 -0400 Subject: [PATCH] Fix quotations not working in localisation --- src/utils.ts | 4 +++- tsconfig.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index 02e2447e..da12b51b 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -268,8 +268,10 @@ export default class Utils { } getLocalizedMessage(text: string): string | false { + console.log(chrome.i18n.getMessage("forceChannelCheckPopup")); const valNewH = text.replace(/__MSG_(\w+)__/g, function(match, v1) { - return v1 ? chrome.i18n.getMessage(v1).replace("\n", "
") : ""; + return v1 ? chrome.i18n.getMessage(v1).replaceAll("<", "<") + .replaceAll('"', """).replaceAll("\n", "
") : ""; }); if(valNewH != text) { diff --git a/tsconfig.json b/tsconfig.json index 8fa7472c..bc56e429 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "target": "es2021", "noImplicitAny": false, "sourceMap": false, "outDir": "dist/js",