Fix quotations not working in localisation

This commit is contained in:
Ajay Ramachandran
2021-07-14 15:28:38 -04:00
parent e39b441c16
commit 528b475429
2 changed files with 4 additions and 2 deletions

View File

@@ -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", "<br/>") : "";
return v1 ? chrome.i18n.getMessage(v1).replaceAll("<", "&#60;")
.replaceAll('"', "&quot;").replaceAll("\n", "<br/>") : "";
});
if(valNewH != text) {