fix: closes #12819, add helper to escape tx strings

This commit is contained in:
Barış Soner Uşaklı
2024-09-23 16:17:35 -04:00
parent 8bca97685c
commit 7d0c2cb66f
2 changed files with 6 additions and 1 deletions

View File

@@ -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') {