Merge lp:~daker/webbrowser-app/fix.1317428 into lp:webbrowser-app
Status: | Needs review |
---|---|
Proposed branch: | lp:~daker/webbrowser-app/fix.1317428 |
Merge into: | lp:webbrowser-app |
Diff against target: |
48 lines (+21/-15) 1 file modified
src/app/AddressBar.qml (+21/-15) |
To merge this branch: | bzr merge lp:~daker/webbrowser-app/fix.1317428 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Phablet Team | Pending | ||
Review via email: mp+225759@code.launchpad.net |
Description of the change
Unfortunately the regexp doesn't work all the time with the QML JS interpreter
QML :
OK : http://
NO : http://
OK : http://
NO : http://
OK : https:/
NO : http://
OK : http://
NO : http://<email address hidden>
OK : http://
NO : http://
OK : http://
NO : www fff
NO : facebook
Chrome/Firefox JS interpreter
OK : http://
OK : http://
OK : http://
OK : http://
OK : https:/
OK : http://
OK : http://
OK : http://<email address hidden>
OK : http://
OK : http://
OK : http://
NO : www fff
NO : facebook
Unmerged revisions
- 608. By Adnane Belmadiaf
-
Validate only hostnames with allowed characters according to RFC 3986
- 607. By Adnane Belmadiaf
-
Added a new regex for URL validation
11 + if (invalid_ hostname_ characters. match(address) ){
12 + return false
13 + }
It doesn’t seem correct to me to apply the invalid_ hostname_ characters RE to the entire address: you’d want to apply it to the host part only. But since we don’t really know whether address is a valid URl yet, there’s no easy way to extract the host part. So I’m not sure this makes sense.