From 30e6383bfcb10a03263793a69ae18fcc6d2e245f Mon Sep 17 00:00:00 2001 From: Mark Patton Date: Mon, 16 Oct 2023 15:08:13 -0400 Subject: [PATCH] Correctly handle whitespace when normalizing proxy user queries (#1228) --- app/components/workflow-basics-user-search/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/components/workflow-basics-user-search/index.js b/app/components/workflow-basics-user-search/index.js index 5f88a0cc..62f71fd4 100644 --- a/app/components/workflow-basics-user-search/index.js +++ b/app/components/workflow-basics-user-search/index.js @@ -49,7 +49,8 @@ export default class WorkflowBasicsUserSearch extends Component { @task searchForUsers = function* (page) { // Strip out non-alphanumberic characters to ensure filter is valid - let input = this.args.searchInput.replace(/\W/g, ''); + // Such characters in the middle of the string become a space + let input = this.args.searchInput.replace(/\W+/g, ' ').trim(); if (input.length == 0) { return;