cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nithin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10923) Android Webview loadUrl with Control Character Fails to load Javascript.
Date Thu, 24 Mar 2016 06:58:25 GMT

    [ https://issues.apache.org/jira/browse/CB-10923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15209888#comment-15209888
] 

Nithin commented on CB-10923:
-----------------------------

Steps to reproduce:

1)Have a edittext in HTML and then enter the below sentences.
Hi
How
Are you.
2)encode the enter the text us JS tryjsref_encodeuricomponent

http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_encodeuricomponent
Hi%0AHow%0A0Are%20you.

3)%0A  is control character / line feed character.
LF	line feed	%0A
http://www.w3schools.com/tags/ref_urlencode.asp

4)This is given to java layer and from HTML.

5) Later same data is given back to JS/HTML via Webview.loadUrl(javascript:setText(Hi%0AHow%0A0Are%20you.))


6) Above data fails to reach the setText JS function.

Note: But text with no control charters reach the setText JS function.

Seen in all android Samsung Lollipop phones with latest system webview..

Thanks
Nithin



> Android Webview loadUrl with Control Character Fails to load Javascript.
> ------------------------------------------------------------------------
>
>                 Key: CB-10923
>                 URL: https://issues.apache.org/jira/browse/CB-10923
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 5.0.1
>         Environment: Using Android Cordova with Sencha touch framework.
>            Reporter: Nithin
>              Labels: triaged
>
> Special character/Control character issue:
> 1)Cordova 3.5.0 allows Special character/Control character(line feed) in webview loadUrl
function..
> 2)Cordova 4.0.2+ does not allow Special character/Control character(line feed) in webview
loadUrl function.(Generally \n should not be part URL).
> Not sure on which exact cordova 3.5.0 + to 4.0.2 version issues started..
> Any thoughts why this behaviour in different cordova versions? where is the filtering
done(Could not find any difference in loadUrl code at java) is JS(Cordova.js) level involved?
pls share your thoughts..
> What excatly the flow when loadUrl  is called? does it reach Cordova.js processMessages
function?Im yet to do debug on the flow..
> Thanks
> Nithin



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message