From b3d75394759e3f586bb48eb392a11afcb9a07f36 Mon Sep 17 00:00:00 2001 From: Clint Andrew Hall Date: Mon, 13 Jul 2020 17:57:48 -0400 Subject: [PATCH] Inclusive Language Refactor (#71522) --- x-pack/plugins/canvas/server/lib/sanitize_name.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/canvas/server/lib/sanitize_name.js b/x-pack/plugins/canvas/server/lib/sanitize_name.js index 295315c3ceb2e..4c787c816a331 100644 --- a/x-pack/plugins/canvas/server/lib/sanitize_name.js +++ b/x-pack/plugins/canvas/server/lib/sanitize_name.js @@ -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, '_'); }