update slug regex
This commit is contained in:
parent
8a5897b4c3
commit
155cfb44e8
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@
|
|||
<script>
|
||||
function convertToSlug(text) {
|
||||
// return encodeURI(text.toLowerCase().replace(/ +/g, '-'));
|
||||
return text.toLowerCase().replace(/ +/g, '-');
|
||||
return text.toLowerCase().replace(/[ ;\.\:\?\!@#\$%\^&\*\(\)\=\+\<\>`~·,。“”?!《》【】:;\\{}\[\]]+/g, '-');
|
||||
}
|
||||
document.getElementById("id_title").addEventListener('input', function (evt) {
|
||||
document.getElementById("id_slug").value = convertToSlug(this.value);
|
||||
|
|
Loading…
Add table
Reference in a new issue