diff options
| author | tobtoht <tob@featherwallet.org> | 2026-04-18 08:09:49 +0000 |
|---|---|---|
| committer | tobtoht <tob@featherwallet.org> | 2026-04-18 08:09:49 +0000 |
| commit | bb4bc4a77ecf4263311cf7b139cd15be28050d3e (patch) | |
| tree | 74925f1e8a88a991cec7c6116c9ba9f40c420ea4 /js | |
| parent | 081848bab0fb2430a4e5650e71b704a9f081bfce (diff) | |
| parent | 23ec5eb6a1dc61ef72a3ca4c9bb5942cbf60d959 (diff) | |
| download | monzero-gui-bb4bc4a77ecf4263311cf7b139cd15be28050d3e.tar.gz monzero-gui-bb4bc4a77ecf4263311cf7b139cd15be28050d3e.tar.xz monzero-gui-bb4bc4a77ecf4263311cf7b139cd15be28050d3e.zip | |
Merge pull request #4577
23ec5eb qml: escape untrusted text in RichText views (selsta)
Diffstat (limited to 'js')
| -rw-r--r-- | js/Utils.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/Utils.js b/js/Utils.js index 9094ca4f..e031c78a 100644 --- a/js/Utils.js +++ b/js/Utils.js @@ -130,3 +130,13 @@ function parseDateStringOrRestoreHeightAsInteger(value) { } return restoreHeight; } + +function htmlEscape(s) { + if (s === null || s === undefined) + return ""; + return String(s) + .replace(/&/g, "&") + .replace(/</g, "<") + .replace(/>/g, ">") + .replace(/"/g, """); +} |
