From b14a50bb35baae5cb058190bd1b5c38eef74ad82 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sun, 6 Nov 2005 22:02:40 +0000 Subject: [PATCH] Fixed #729 -- prepopulate_from (urlify.js) now removes characters that aren't a-z, 0-9 or spaces git-svn-id: http://code.djangoproject.com/svn/django/trunk@1097 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/media/js/urlify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/admin/media/js/urlify.js b/django/contrib/admin/media/js/urlify.js index 5cdb6890c4..8b8dbfa59e 100644 --- a/django/contrib/admin/media/js/urlify.js +++ b/django/contrib/admin/media/js/urlify.js @@ -7,7 +7,7 @@ function URLify(s, num_chars) { "with"]; r = new RegExp('\\b(' + removelist.join('|') + ')\\b', 'gi'); s = s.replace(r, ''); - s = s.replace(/[^\w\s-]/g, ''); // remove unneeded chars + s = s.replace(/[^-A-Z0-9\s]/gi, ''); // remove unneeded chars s = s.replace(/^\s+|\s+$/g, ''); // trim leading/trailing spaces s = s.replace(/\s+/g, '-'); // convert spaces to hyphens s = s.toLowerCase(); // convert to lowercase