Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6029)

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm

Issue 8364001: Strip special characters in extension omnibox suggestions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
===================================================================
--- chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm (revision 106488)
+++ chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm (working copy)
@@ -103,12 +103,16 @@
// and description cases. Returns NSMutableAttributedString as a
// convenience for MatchText().
NSMutableAttributedString* OmniboxPopupViewMac::DecorateMatchedString(
- const string16 &matchString,
+ const string16& matchStringIn,
const AutocompleteMatch::ACMatchClassifications &classifications,
NSColor* textColor, NSColor* dimTextColor, gfx::Font& font) {
// Cache for on-demand computation of the bold version of |font|.
NSFont* boldFont = nil;
+ string16 matchString;
+ const char16 kNewlineChar[] = { '\n', '\0' };
+ RemoveChars(matchStringIn, kNewlineChar, &matchString);
Scott Hess - ex-Googler 2011/10/20 19:54:03 Should this remove the newline, or convert it to a
+
// Start out with a string using the default style info.
NSString* s = base::SysUTF16ToNSString(matchString);
NSDictionary* attributes = [NSDictionary dictionaryWithObjectsAndKeys:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698