diff --git a/ui/imports/shared/status/StatusChatInput.qml b/ui/imports/shared/status/StatusChatInput.qml index 4fa2d487b7c..7a9113703f3 100644 --- a/ui/imports/shared/status/StatusChatInput.qml +++ b/ui/imports/shared/status/StatusChatInput.qml @@ -796,7 +796,7 @@ Rectangle { function validSubstr(substr) { for(var i = 0; i < substr.length; i++) { var c = substr.charAt(i); - if (Utils.isSpace(c) === true || Utils.isPunct(c) === true) + if (Utils.isSpace(c) || Utils.isPunct(c)) return false; } return true; diff --git a/ui/imports/utils/Utils.qml b/ui/imports/utils/Utils.qml index 052e1569561..78db7aa3691 100644 --- a/ui/imports/utils/Utils.qml +++ b/ui/imports/utils/Utils.qml @@ -755,7 +755,6 @@ QtObject { // Leave this function at the bottom of the file as QT Creator messes up the code color after this function isPunct(c) { - return /(!|\@|#|\$|%|\^|&|\*|\(|\)|_|\+|\||-|=|\\|{|}|[|]|"|;|'|<|>|\?|,|\.|\/)/.test(c) + return /(!|\@|#|\$|%|\^|&|\*|\(|\)|\+|\||-|=|\\|{|}|[|]|"|;|'|<|>|\?|,|\.|\/)/.test(c) } - }