Bug 826547 - STK proactive command Launch Browser does nothing #7387

Merged
merged 1 commit into from Jan 9, 2013

Conversation

Projects
None yet
2 participants
Contributor

arcturus commented Jan 8, 2013

Preventing urls that are not matching the web activity to be launched

apps/settings/js/icc.js
- openLink(options.url);
+ var url = options.url;
+ if (url !== null && url.length !== 0 &&
+ (!options.confirmMessage || confirm(options.confirmMessage))) {
@vingtetun

vingtetun Jan 9, 2013

Contributor

I just want to make sure this is really what you want to do. If the URL is empty (which is likely and edge case) there won't be any confirmation dialog. That sounds good but I don't know if that's what supposed to be for the cert.

apps/settings/js/icc.js
+ (!options.confirmMessage || confirm(options.confirmMessage))) {
+ // Sanitise url just in case it doesn't start with http or https
+ // the web activity won't work, so add by default the http protocol
+ if (url && url.length > 0 && url.search("^https?:") == -1) {
@vingtetun

vingtetun Jan 9, 2013

Contributor

You have checked url above so the first 2 checks should be unnecessary.

apps/settings/js/icc.js
+ // the web activity won't work, so add by default the http protocol
+ if (url && url.length > 0 && url.search("^https?:") == -1) {
+ // Our url doesn't contains the protocol
+ url = 'http://' + url;
@vingtetun

vingtetun Jan 9, 2013

Contributor

Also your regexp check for httpp(s): but add extra // so it can result into ////. Maybe you want to check that too?

Contributor

arcturus commented Jan 9, 2013

Thanks for the comments @vingtetun, don't know what was thinking yesterday ;)

Will fix them ASAP.

Cheers!

Bug 826547 - STK proactive command Launch Browser does nothing
Preventing urls that are not matching the web activity to be launched

arcturus added a commit that referenced this pull request Jan 9, 2013

Merge pull request #7387 from arcturus/bug-826547
Bug 826547 - STK proactive command Launch Browser does nothing

@arcturus arcturus merged commit a9c7e41 into mozilla-b2g:master Jan 9, 2013

@arcturus arcturus deleted the arcturus:bug-826547 branch Jan 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment