We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5f84906 + 919b746 commit e380541Copy full SHA for e380541
public/js/extra.js
@@ -156,7 +156,11 @@ export function renderTags (view) {
156
}
157
158
function slugifyWithUTF8 (text) {
159
- let newText = S(text.toLowerCase()).trim().stripTags().dasherize().s
+ // remove html tags and trim spaces
160
+ let newText = S(text).trim().stripTags().s
161
+ // replace all spaces in between to dashes
162
+ newText = newText.replace(/\s+/g, '-')
163
+ // slugify string to make it valid for attribute
164
newText = newText.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, '')
165
return newText
166
0 commit comments