Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit ca4df14

Browse files
baxissimostellaraccident
authored andcommitted
add more chars to escape when populating searchbox
If you use C++ bindings and __PRETTY_FUNCTION__ to generate the name of the scope, you end up with things like ``` void *foo(bool) ``` as scope names. And for objectiveC you have things like ``` [MyClass setThing] ``` And I'm sure there's some situation in which { } might be used by someone too.
1 parent 39d94c3 commit ca4df14

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wtf/app/tracks/trackinfobar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ wtf.app.tracks.TrackInfoBar = function(tracksPanel, parentElement) {
155155
// TODO(benvanik): escape other characters?
156156
filterString =
157157
'/^' +
158-
filterString.replace(/([\.\$\-\*\+])/g, '\\$1') +
158+
filterString.replace(/([\.\$\-\*\+\[\]\(\)\{\}])/g, '\\$1') +
159159
'$/';
160160
}
161161
var parsed = this.selection_.setFilterExpression(filterString);

0 commit comments

Comments
 (0)