Ticket #3259: prepopulate.diff
File prepopulate.diff, 669 bytes (added by , 18 years ago) |
---|
-
django/contrib/admin/media/js/urlify.js
=== modified file 'django/contrib/admin/media/js/urlify.js'
7 7 "with"]; 8 8 r = new RegExp('\\b(' + removelist.join('|') + ')\\b', 'gi'); 9 9 s = s.replace(r, ''); 10 s = s.replace(/[^- A-Z0-9\s]/gi, ''); // remove unneeded chars10 s = s.replace(/[^-\w\s]/g, ''); // remove unneeded chars 11 11 s = s.replace(/^\s+|\s+$/g, ''); // trim leading/trailing spaces 12 12 s = s.replace(/[-\s]+/g, '-'); // convert spaces to hyphens 13 13 s = s.toLowerCase(); // convert to lowercase