diff --git a/src/Slugger.js b/src/Slugger.js index 147b634e..00f63e48 100644 --- a/src/Slugger.js +++ b/src/Slugger.js @@ -14,7 +14,7 @@ module.exports = class Slugger { .toLowerCase() .trim() // remove html tags - .replace(//g, '') + .replace(/<[!\/a-z].*?>/ig, '') // remove unwanted chars .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '') .replace(/\s/g, '-');