Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #3259 -- Fixed problem with prepopulate_from for fields containing

underscores in their name. Patch from Gary Wilson.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4537 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 795d832a017dafa745c5d8edf5082939987ecb09 1 parent f5ede9c
Malcolm Tredinnick authored February 17, 2007
2  django/contrib/admin/media/js/urlify.js
@@ -7,7 +7,7 @@ function URLify(s, num_chars) {
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 chars
  10
+    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

0 notes on commit 795d832

Please sign in to comment.
Something went wrong with that request. Please try again.