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)

This commit is contained in:
bordun 2020-03-17 18:41:22 +01:00
parent 6bded203a8
commit 421999e70b
2 changed files with 2 additions and 1 deletions

View file

@ -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

View file

@ -116,7 +116,7 @@ module.exports = {
return `<i class="fa fa-fw fa-${i}"></i>`
},
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) {