Merge lp:~osomon/webbrowser-app/suggestions-always-rich-text into lp:webbrowser-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 157
Merged at revision: 160
Proposed branch: lp:~osomon/webbrowser-app/suggestions-always-rich-text
Merge into: lp:webbrowser-app
Diff against target: 33 lines (+3/-2)
2 files modified
src/Ubuntu/Browser/Suggestions.qml (+1/-0)
tests/autopilot/webbrowser_app/tests/test_history.py (+2/-2)
To merge this branch: bzr merge lp:~osomon/webbrowser-app/suggestions-always-rich-text
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Günter Schwann (community) Approve
Review via email: mp+167350@code.launchpad.net

Commit message

Always format the suggestions as rich text, to ensure ampersands are not incorrectly escaped.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Günter Schwann (schwann) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/Browser/Suggestions.qml'
2--- src/Ubuntu/Browser/Suggestions.qml 2013-05-31 16:34:52 +0000
3+++ src/Ubuntu/Browser/Suggestions.qml 2013-06-04 17:23:27 +0000
4@@ -106,6 +106,7 @@
5 '<b><font color="#DD4814">$&</font></b>')
6 }
7 highlighted = highlighted.replace(new RegExp('&', 'g'), '&amp;')
8+ highlighted = '<html>' + highlighted + '</html>'
9 return highlighted
10 }
11 }
12
13=== modified file 'tests/autopilot/webbrowser_app/tests/test_history.py'
14--- tests/autopilot/webbrowser_app/tests/test_history.py 2013-05-31 17:34:47 +0000
15+++ tests/autopilot/webbrowser_app/tests/test_history.py 2013-06-04 17:23:27 +0000
16@@ -13,7 +13,7 @@
17 import sqlite3
18 import time
19
20-from testtools.matchers import Equals
21+from testtools.matchers import Contains, Equals
22 from autopilot.matchers import Eventually
23
24 from webbrowser_app.tests import BrowserTestCaseBase
25@@ -125,7 +125,7 @@
26 entry = entries[2]
27 highlight = '<b><font color="#DD4814">Ubuntu</font></b>'
28 url = "http://en.wikipedia.org/wiki/%s_(operating_system)" % highlight
29- self.assertThat(entry.subText, Equals(url))
30+ self.assertThat(entry.subText, Contains(url))
31 self.pointing_device.move_to_object(entry)
32 self.pointing_device.click()
33 webview = self.main_window.get_web_view()

Subscribers

People subscribed via source and target branches

to status/vote changes: