File tree Expand file tree Collapse file tree
WKWebViewJavascriptBridge Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,9 +109,9 @@ public class WKWebViewJavascriptBridgeBase: NSObject {
109109 messageJSON = messageJSON. replacingOccurrences ( of: " \' " , with: " \\ \' " )
110110 messageJSON = messageJSON. replacingOccurrences ( of: " \n " , with: " \\ n " )
111111 messageJSON = messageJSON. replacingOccurrences ( of: " \r " , with: " \\ r " )
112- // messageJSON = messageJSON.replacingOccurrences(of: "\f ", with: "\\f")
113- // messageJSON = messageJSON.replacingOccurrences(of: "\u2028 ", with: "\\u2028")
114- // messageJSON = messageJSON.replacingOccurrences(of: "\u2029 ", with: "\\u2029")
112+ messageJSON = messageJSON. replacingOccurrences ( of: " \u{000C} " , with: " \\ f " )
113+ messageJSON = messageJSON. replacingOccurrences ( of: " \u{2028} " , with: " \\ u2028 " )
114+ messageJSON = messageJSON. replacingOccurrences ( of: " \u{2029} " , with: " \\ u2029 " )
115115
116116 let javascriptCommand = " WKWebViewJavascriptBridge._handleMessageFromiOS(' \( messageJSON) '); "
117117 if Thread . current. isMainThread {
You can’t perform that action at this time.
0 commit comments