Node.js based forum software built for the modern web
fix: closes #12819, add helper to escape tx strings
Barış Soner Uşaklı7d0c2cb66f2c
diff --git a/install/package.json b/install/package.jsonindex 336b6ba7ed..a12a6c58bc 100644--- a/install/package.json+++ b/install/package.json@@ -107,7 +107,7 @@"nodebb-plugin-ntfy": "1.7.7","nodebb-plugin-spam-be-gone": "2.2.2","nodebb-rewards-essentials": "1.0.0",- "nodebb-theme-harmony": "1.2.70",+ "nodebb-theme-harmony": "1.2.71","nodebb-theme-lavender": "7.1.8","nodebb-theme-peace": "2.2.7","nodebb-theme-persona": "13.3.37",diff --git a/public/src/modules/helpers.common.js b/public/src/modules/helpers.common.jsindex c5533cf56b..5638f29928 100644--- a/public/src/modules/helpers.common.js+++ b/public/src/modules/helpers.common.js@@ -32,6 +32,7 @@ module.exports = function (utils, Benchpress, relative_path) {shouldHideReplyContainer,humanReadableNumber,formattedNumber,+ txEscape,generatePlaceholderWave,register,__escape: identity,@@ -366,6 +367,10 @@ module.exports = function (utils, Benchpress, relative_path) {return utils.addCommas(number);}+ function txEscape(text) {+ return String(text).replace(/%/g, '%').replace(/,/g, ',');+ }+function generatePlaceholderWave(items) {const html = items.map((i) => {if (i === 'divider') {