We already trim newlines, but let's go whole-hog here and do all
whitespace, since none of it serves any purpose.
BUG: 505538
FIXED-IN: 6.4.1
(cherry picked from commit
d51f99e2b790daf042294f4080b4405c5e128841)
Co-authored-by: Nate Graham <nate@kde.org>
Gbp-Pq: Name upstream_ac955439_SearchField-trim-all-whitespace-from-search-text.patch
placeholderText: (!enabled || !page || page.hasOwnProperty("isHome") || window.leftPage.name.length === 0) ? i18n("Search…") : i18n("Search in '%1'…", window.leftPage.name)
onAccepted: {
- text = text.replace(/\n/g, ' ');
+ text = text.trim();
currentSearchText = text;
}