diff --git a/server/expression/executor.go b/server/expression/executor.go index c4e21b9e40..8874178b55 100644 --- a/server/expression/executor.go +++ b/server/expression/executor.go @@ -211,7 +211,8 @@ func (e Executor) resolveTerm(term *Term) (value.Value, error) { strValue = fmt.Sprintf(term.Str.Text, stringArgs...) } - return value.NewFromString(strValue), nil + str := value.NewFromString(strValue) + return value.NewFromString(str.UnescappedString()), nil } return value.Nil, fmt.Errorf("empty term") diff --git a/server/expression/executor_test.go b/server/expression/executor_test.go index a52ff2d0f7..f78247ade4 100644 --- a/server/expression/executor_test.go +++ b/server/expression/executor_test.go @@ -58,6 +58,11 @@ func TestBasicExpressionExecution(t *testing.T) { Query: `100ms < 200 ms`, ShouldPass: true, }, + { + Name: "escaped_strings_must_be_equal_to_unescaped_strings", + Query: `'This should be workin\'' = "This should be workin'"`, + ShouldPass: true, + }, } executeTestCases(t, testCases)