Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
filter: Don't lowercase search operands.
Evy Kassirerb63b4a26c878
diff --git a/web/src/filter.ts b/web/src/filter.tsindex bdc091aeb7f..2e9741f7a39 100644--- a/web/src/filter.ts+++ b/web/src/filter.ts@@ -361,10 +361,7 @@ export class Filter {// phrase search behavior, however. So, we replace all instances of// curly quotes with regular quotes when doing a search. This is// unlikely to cause any problems and is probably what the user wants.- operand = operand- .toString()- .toLowerCase()- .replaceAll(/[\u201C\u201D]/g, '"');+ operand = operand.toString().replaceAll(/[\u201C\u201D]/g, '"');break;default:operand = operand.toString().toLowerCase();diff --git a/web/tests/filter.test.cjs b/web/tests/filter.test.cjsindex 21545e32aff..61f0589c8f8 100644--- a/web/tests/filter.test.cjs+++ b/web/tests/filter.test.cjs@@ -978,7 +978,7 @@ test("canonicalization", () => {term = Filter.canonicalize_term({operator: "search", operand: "fOO"});assert.equal(term.operator, "search");- assert.equal(term.operand, "foo");+ assert.equal(term.operand, "fOO");term = Filter.canonicalize_term({operator: "search", operand: 123});assert.equal(term.operator, "search");diff --git a/web/tests/narrow_state.test.cjs b/web/tests/narrow_state.test.cjsindex 46f702f196a..b6673146bb6 100644--- a/web/tests/narrow_state.test.cjs+++ b/web/tests/narrow_state.test.cjs@@ -162,7 +162,7 @@ test("terms", () => {assert.equal(result[1].operand, "Bar");assert.equal(result[2].operator, "search");- assert.equal(result[2].operand, "yo");+ assert.equal(result[2].operand, "Yo");message_lists.set_current(undefined);result = narrow_state.search_terms();