apache / cordova-ios

Apache Cordova iOS

Home Page:https://cordova.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Line separator (U+2028) and paragraph separator (U+2029) Got JS Exception SyntaxError

crmo opened this issue · comments

commented

When Objective-c call JavaScript use function stringByEvaluatingJavaScriptFromString: with Line separator (U+2028) or paragraph separator (U+2029), JavaScript will get error.
In CDVUIWebViewEngine.m, function evaluateJavaScript:completionHandler:. The caller may pass in these special characters.Before call stringByEvaluatingJavaScriptFromString:,we can do some filtering.

I found the same bug on cordova-osx. I discovered the same issue came up on cordova-android@6, not sure if it is still an issue on cordova-android@7 or not. I investigate and report next week.