From a29a430f91c6bb97960a81cd17a10519e267766c Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 7 Nov 2022 08:16:18 +0800 Subject: [PATCH] Fix bug causing quotes to appear around notes on iOS When serialized to a JSON string quotes are added, so we were double quoting our strings. --- apple/OmnivoreKit/Sources/Views/Article/OmnivoreWebView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/OmnivoreKit/Sources/Views/Article/OmnivoreWebView.swift b/apple/OmnivoreKit/Sources/Views/Article/OmnivoreWebView.swift index beb6f0d6d..234da0c9b 100644 --- a/apple/OmnivoreKit/Sources/Views/Article/OmnivoreWebView.swift +++ b/apple/OmnivoreKit/Sources/Views/Article/OmnivoreWebView.swift @@ -429,7 +429,7 @@ public enum WebViewDispatchEvent { let encoder = JSONEncoder() if let encoded = try? encoder.encode(annotation) { let str = String(decoding: encoded, as: UTF8.self) - return "event.annotation = '\(str)';" + return "event.annotation = \(str);" } else { throw BasicError.message(messageText: "Unable to serialize highlight note.") }