* Remove HTML tag when handling slug, fixed #49 * Fix slugify
This commit is contained in:
parent
847cf3b656
commit
114955558e
2 changed files with 5 additions and 0 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
## 1.5.1
|
||||||
|
### Bug fixes
|
||||||
|
- Remove HTML tag when handling slug
|
||||||
|
|
||||||
## 1.5.0
|
## 1.5.0
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ export function slugify (string) {
|
||||||
if (!maintainCase) string = string.toLowerCase()
|
if (!maintainCase) string = string.toLowerCase()
|
||||||
|
|
||||||
let slug = string.trim()
|
let slug = string.trim()
|
||||||
|
.replace(/<[^>\d]+>/g, '')
|
||||||
.replace(re, '')
|
.replace(re, '')
|
||||||
.replace(/\s/g, replacement)
|
.replace(/\s/g, replacement)
|
||||||
let occurrences = slugify.occurrences[slug]
|
let occurrences = slugify.occurrences[slug]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue