github.com/hernad/nomad@v1.6.112/ui/app/utils/escape-task-name.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 export default function escapeTaskName(taskName) { 7 // Regular expression is taken from here: https://stackoverflow.com/a/20053121 8 return taskName.replace(/[^a-zA-Z0-9,._+@%/-]/gu, '\\$&'); 9 }