You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "jcesarmobile (JIRA)" <ji...@apache.org> on 2016/07/17 15:34:20 UTC
[jira] [Updated] (CB-4603) InAppBrowser parseFeature doesn't strip
whitespace from supplied options
[ https://issues.apache.org/jira/browse/CB-4603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
jcesarmobile updated CB-4603:
-----------------------------
Environment:
Android, iOS
was:Android
> InAppBrowser parseFeature doesn't strip whitespace from supplied options
> ------------------------------------------------------------------------
>
> Key: CB-4603
> URL: https://issues.apache.org/jira/browse/CB-4603
> Project: Apache Cordova
> Issue Type: Improvement
> Components: Android, iOS, Plugin InAppBrowser
> Affects Versions: 3.0.0
> Environment: Android, iOS
> Reporter: Jon Whitlock
> Assignee: Joe Bowser
> Priority: Minor
> Labels: Triaged
>
> Short story:
> window.open('/', '_blank', 'location=no,hidden=yes');
> ... works,
> window.open('/', '_blank', 'location=no, hidden=yes');
> ... doesn't.
> parseFeature does
> StringTokenizer features = new StringTokenizer(optString, ",");
> ... where optString is that third parameter. Then in the case of deciding if a window should be hidden on launch, in showWebPage tries;
> Boolean hidden = features.get(HIDDEN);
> where
> private static final String HIDDEN = "hidden";
> "hidden" != " hidden" ;)
> 'location = no,hidden = yes' etc also breaks it.
> It's a one-line fix, around line 248 in InAppBrowser.java;
> {code:title=InAppBrowser.java|borderStyle=solid}
> private HashMap<String, Boolean> parseFeature(String optString) {
> if (optString.equals(NULL)) {
> return null;
> } else {
> HashMap<String, Boolean> map = new HashMap<String, Boolean>();
> optString = optString.replaceAll("\\s",""); /* this line fixes it*/
> {code}
--
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