File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/commonMain/kotlin/com/algolia/search/model/filter Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ public sealed class Filter {
9090 public constructor (
9191 value: String ,
9292 isNegated: Boolean = false
93- ) : this (Attribute (" _tags" ), isNegated, value.escape() )
93+ ) : this (Attribute (" _tags" ), isNegated, value)
9494
9595 /* *
9696 * Operator to negates a [Filter.Tag].
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ internal fun Filter.Facet.toSQL(): String {
2525}
2626
2727internal fun Filter.Tag.toSQL (): String {
28- val expression = " $attribute :$value "
28+ val expression = " $attribute :${ value.escape()} "
2929
3030 return if (isNegated) " NOT $expression " else expression
3131}
@@ -99,7 +99,7 @@ internal fun Filter.Facet.toLegacy(): List<String> {
9999}
100100
101101internal fun Filter.Tag.toLegacy (): List <String > {
102- val value = if (isNegated) " -$value " else value
102+ val value = if (isNegated) " -${ value.escape()} " else value.escape()
103103
104104 return listOf (" $attribute :$value " )
105105}
You can’t perform that action at this time.
0 commit comments