Allowing hyphen in CPT UI slugs
function replaceSpecialCharacters(s) {
s = s.replace(/[^a-z0-9\s]/gi, '_');
return s;
}
change the above to
function replaceSpecialCharacters(s) {
s = s.replace(/[^a-z0-9\s-]/gi, '_');
return s;
}