| Index: chrome/browser/resources/downloads/downloads.js
|
| diff --git a/chrome/browser/resources/downloads/downloads.js b/chrome/browser/resources/downloads/downloads.js
|
| index 0979d0cdf10ea9600fdc74cdb54e1a8ef0eee753..d50f5eb66fc04bfd039868bc30a91a4b90ac36db 100644
|
| --- a/chrome/browser/resources/downloads/downloads.js
|
| +++ b/chrome/browser/resources/downloads/downloads.js
|
| @@ -758,7 +758,19 @@ function load() {
|
| function setSearch(searchText) {
|
| fifoResults.length = 0;
|
| downloads.setSearchText(searchText);
|
| - chrome.send('getDownloads', [searchText.toString()]);
|
| + searchText = searchText.toString().match(/(?:[^\s"]+|"[^"]*")+/g);
|
| + if (searchText) {
|
| + searchText = searchText.map(function(term) {
|
| + // strip quotes
|
| + return (term.match(/\s/) &&
|
| + term[0].match(/["']/) &&
|
| + term[term.length - 1] == term[0]) ?
|
| + term.substr(1, term.length - 2) : term;
|
| + });
|
| + } else {
|
| + searchText = [];
|
| + }
|
| + chrome.send('getDownloads', searchText);
|
| }
|
|
|
| function clearAll() {
|
|
|