diff --git a/passbook/static/static/passbook/pf.js b/passbook/static/static/passbook/pf.js index 99f8609cd..4a8780884 100644 --- a/passbook/static/static/passbook/pf.js +++ b/passbook/static/static/passbook/pf.js @@ -41,8 +41,8 @@ document.querySelectorAll(".codemirror").forEach((cm) => { const convertToSlug = (text) => { return text .toLowerCase() - .replace(/[^\w ]+/g, '') - .replace(/ +/g, '-'); + .replace(/ /g, '-') + .replace(/[^\w-]+/g, ''); }; document.querySelectorAll("input[name=name]").forEach((input) => {