1
0

Base the slug off of the title

This commit is contained in:
Bharat Mediratta 2012-01-21 17:15:07 -08:00
parent 4ae8bb6c1c
commit f2d5a4c6c0

View File

@ -9,7 +9,7 @@
});
$('form input[name^=title]').change(function() {
var title = $(this).val();
slug = slug.replace(/^\'/, "");
slug = title.replace(/^\'/, "");
var slug = title.replace(/[^A-Za-z0-9-_]+/g, "-");
slug = slug.replace(/^-/, "");
slug = slug.replace(/-$/, "");