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

Commit

Permalink
add more chars to escape when populating searchbox
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
baxissimo authored and stellaraccident committed Oct 12, 2017
1 parent 39d94c3 commit ca4df14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wtf/app/tracks/trackinfobar.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ wtf.app.tracks.TrackInfoBar = function(tracksPanel, parentElement) {
// TODO(benvanik): escape other characters?
filterString =
'/^' +
filterString.replace(/([\.\$\-\*\+])/g, '\\$1') +
filterString.replace(/([\.\$\-\*\+\[\]\(\)\{\}])/g, '\\$1') +
'$/';
}
var parsed = this.selection_.setFilterExpression(filterString);
Expand Down

0 comments on commit ca4df14

Please sign in to comment.