Commit 0ab573ce authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Don't insert unprintable characters in KRunner

parent f3c6af1b
......@@ -221,7 +221,10 @@ ColumnLayout {
} else if (ctrl && event.key === Qt.Key_K) {
decrementCurrentIndex()
} else if (event.text !== "") {
queryField.text += event.text;
// This prevents unprintable control characters from being inserted
if (!/[\x00-\x1F\x7F]/.test(event.text)) {
queryField.text += event.text;
}
queryField.focus = true;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment