Skip to content

Commit

Permalink
[7.x] Inclusive Language Refactor (#71522) (#71554)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
clintandrewhall and elasticmachine authored Jul 15, 2020
1 parent 5cad3fa commit d9b393f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x-pack/plugins/canvas/server/lib/sanitize_name.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/

export function sanitizeName(name) {
// blacklisted characters
const blacklist = ['(', ')'];
const pattern = blacklist.map((v) => escapeRegExp(v)).join('|');
// invalid characters
const invalid = ['(', ')'];
const pattern = invalid.map((v) => escapeRegExp(v)).join('|');
const regex = new RegExp(pattern, 'g');
return name.replace(regex, '_');
}
Expand Down

0 comments on commit d9b393f

Please sign in to comment.