marcuswestin/WebViewJavascriptBridge — pull request #77 by nolanw (2014-04-16 06:23:16+00:00)
Title: Escape U+2028 and U+2029 when writing JSON as a JavaScript string literal

U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR are not allowed in a JavaScript string literal, though they are valid JSON. Trying to send a message with either causes an "unexpected EOF" exception on the JavaScript side. [Here](http://timelessrepo.com/json-isnt-a-javascript-subset)'s a relevant blog post on the issue.

You can test this by doing something like `[_bridge send:@"A string sent\u2028 from ObjC to JS" responseCallback:nil]`.