Merge lp:~osomon/webbrowser-app/escape-all-html-entities-in-search-queries into lp:webbrowser-app/staging

Proposed by Olivier Tilloy
Status: Merged
Merged at revision: 1590
Proposed branch: lp:~osomon/webbrowser-app/escape-all-html-entities-in-search-queries
Merge into: lp:webbrowser-app/staging
Diff against target: 23 lines (+2/-1)
2 files modified
src/app/webbrowser/AddressBar.qml (+1/-1)
tests/unittests/qml/tst_AddressBar.qml (+1/-0)
To merge this branch: bzr merge lp:~osomon/webbrowser-app/escape-all-html-entities-in-search-queries
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+314023@code.launchpad.net

Commit message

Escape all HTML entities in search queries.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/webbrowser/AddressBar.qml'
2--- src/app/webbrowser/AddressBar.qml 2016-07-01 08:52:37 +0000
3+++ src/app/webbrowser/AddressBar.qml 2017-01-03 16:22:24 +0000
4@@ -301,7 +301,7 @@
5 property var securityCertificateDetails: null
6
7 function escapeHtmlEntities(query) {
8- return query.replace(/\W/, encodeURIComponent)
9+ return query.replace(/\W/g, encodeURIComponent)
10 }
11
12 function buildSearchUrl(query) {
13
14=== modified file 'tests/unittests/qml/tst_AddressBar.qml'
15--- tests/unittests/qml/tst_AddressBar.qml 2015-11-17 17:16:37 +0000
16+++ tests/unittests/qml/tst_AddressBar.qml 2017-01-03 16:22:24 +0000
17@@ -163,6 +163,7 @@
18 {text: "\"kung fu\"", escaped: "%22kung+fu%22"},
19 {text: "surfin' usa", escaped: "surfin'+usa"},
20 {text: "to be or not to be?", escaped: "to+be+or+not+to+be%3F"},
21+ {text: "c++ cout", escaped: "c%2B%2B+cout"},
22 ]
23 }
24

Subscribers

People subscribed via source and target branches