Chromium Code Reviews| Index: chrome/browser/ui/find_bar/find_tab_helper.cc |
| diff --git a/chrome/browser/ui/find_bar/find_tab_helper.cc b/chrome/browser/ui/find_bar/find_tab_helper.cc |
| index 8a3570f750f53f303f90d39e83f7a1d2d391072a..ede634540910692b122490c23d41bf78782a7d5b 100644 |
| --- a/chrome/browser/ui/find_bar/find_tab_helper.cc |
| +++ b/chrome/browser/ui/find_bar/find_tab_helper.cc |
| @@ -40,6 +40,9 @@ FindTabHelper::~FindTabHelper() { |
| void FindTabHelper::StartFinding(base::string16 search_string, |
| bool forward_direction, |
| bool case_sensitive) { |
| + const base::char16 kInvalidChars[] = { '\r', 0 }; |
| + base::RemoveChars(search_string, kInvalidChars, &search_string); |
|
Peter Kasting
2014/07/09 00:27:05
You can just pass L"\r" here directly, no need to
msw
2014/07/09 00:40:12
Done.
Peter Kasting
2014/07/09 00:43:26
I'm thinking of pages that actually contain, say,
msw
2014/07/09 15:39:33
The patch works well in my tests of the following
|
| + |
| // If search_string is empty, it means FindNext was pressed with a keyboard |
| // shortcut so unless we have something to search for we return early. |
| if (search_string.empty() && find_text_.empty()) { |