Skip to content

Commit 992afaf

Browse files
committed
Escape the escape!
1 parent bf2d785 commit 992afaf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/Sources/Storage/GRDB/Model/PersistedProduct.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ public extension PersistedProduct {
156156
/// - Returns: An escaped pattern safe for use in LIKE queries
157157
private static func escapeSQLLikePattern(_ pattern: String) -> String {
158158
pattern
159+
.replacingOccurrences(of: "\\", with: "\\\\")
159160
.replacingOccurrences(of: "%", with: "\\%")
160161
.replacingOccurrences(of: "_", with: "\\_")
161162
}

0 commit comments

Comments
 (0)