Skip to content

Commit 1149555

Browse files
authored
Remove HTML tag when handling slug, fixed #49 (#50)
* Remove HTML tag when handling slug, fixed #49 * Fix slugify
1 parent 847cf3b commit 1149555

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.5.1
2+
### Bug fixes
3+
- Remove HTML tag when handling slug
4+
15
## 1.5.0
26

37
### Bug fixes

src/util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export function slugify (string) {
117117
if (!maintainCase) string = string.toLowerCase()
118118

119119
let slug = string.trim()
120+
.replace(/<[^>\d]+>/g, '')
120121
.replace(re, '')
121122
.replace(/\s/g, replacement)
122123
let occurrences = slugify.occurrences[slug]

0 commit comments

Comments
 (0)