You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/09/06 12:29:49 UTC

[GitHub] crmo commented on issue #403: fix#402 Line separator (U+2028) and paragraph separator (U+2029) Got …

crmo commented on issue #403: fix#402 Line separator (U+2028) and paragraph separator (U+2029) Got …
URL: https://github.com/apache/cordova-ios/pull/403#issuecomment-419075347
 
 
   > Can you explain a bit why and when someone might call this function with these characters?
   
   I custom a plugin in my project, Its function is to get data from the network and return it to JavaScript.I call `sendPluginResult:callbackId:` like this:
   ```
       // fetch from network, may contain \u2028 or \u2029
       NSString *data = @"...\u2028...";
       CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:data];
       [self.commandDelegate sendPluginResult:pluginResult callbackId:aCallBackId];
   ```
   
   > Are those the only ones that could be problematic?
   
   Sorry,I am not sure about this problem.But I find a [table](http://tools.jb51.net/table/javascript_escape) about js special characters,and [some discussion about this issue](https://stackoverflow.com/questions/2965293/javascript-parse-error-on-u2028-unicode-character).I verified these special characters.Only these two characters have problems

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org