Index: chrome/browser/resources/print_preview/search/destination_list.js |
diff --git a/chrome/browser/resources/print_preview/search/destination_list.js b/chrome/browser/resources/print_preview/search/destination_list.js |
index b96f8076f0903bf45c32510a385a217092fbb9b4..ed6e53fc3441ddf06e0dec932e9080677f0cf3fb 100644 |
--- a/chrome/browser/resources/print_preview/search/destination_list.js |
+++ b/chrome/browser/resources/print_preview/search/destination_list.js |
@@ -189,15 +189,9 @@ cr.define('print_preview', function() { |
this.renderDestinations_(); |
}, |
- /** @param {?string} query Query to update the filter with. */ |
+ /** @param {RegExp} query Query to update the filter with. */ |
updateSearchQuery: function(query) { |
- if (!query) { |
- this.query_ = null; |
- } else { |
- // Generate regexp-safe query by escaping metacharacters. |
- var safeQuery = query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); |
- this.query_ = new RegExp('(' + safeQuery + ')', 'ig'); |
- } |
+ this.query_ = query; |
this.renderDestinations_(); |
}, |