From 590c4ae8c4deb37371b8b5eb8494b847d84966fd Mon Sep 17 00:00:00 2001 From: bordun Date: Tue, 17 Mar 2020 18:41:22 +0100 Subject: [PATCH] misc: prevent converting `"^icon-name"` to an icon (in text widgets and labels) when `icon-name` is too short to be a valid icon name (minimum 4 characters) --- CHANGELOG.md | 1 + src/client/app/ui/utils.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66f53af3..feb2b81c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - misc - prevent `--disable-gpu` from bypassing the launcher window + - prevent converting `"^icon-name"` to an icon (in text widgets and labels) when `icon-name` is too short to be a valid icon name (minimum 4 characters) ## 0.49.9 diff --git a/src/client/app/ui/utils.js b/src/client/app/ui/utils.js index 6ebbe6c1..4aa769a7 100644 --- a/src/client/app/ui/utils.js +++ b/src/client/app/ui/utils.js @@ -116,7 +116,7 @@ module.exports = { return `` }, iconify:function(string){ - return String(string).replace(/\^[^\s]*/g,(x)=>{return module.exports.icon(x.substring(1))}) + return String(string).replace(/\^[^\s]{4,}/g,(x)=>{return module.exports.icon(x.substring(1))}) }, upload: function(types, ok, error) {