#2282: Urlify in admin compatible with accents
-----------------------------------------------+----------------------------
   Reporter:  David Larlet <[EMAIL PROTECTED]>  |                Owner:  nobody 
               
     Status:  reopened                         |            Component:  Admin 
interface       
    Version:  SVN                              |           Resolution:          
              
   Keywords:                                   |                Stage:  Design 
decision needed
  Has_patch:  0                                |           Needs_docs:  0       
              
Needs_tests:  0                                |   Needs_better_patch:  0       
              
-----------------------------------------------+----------------------------
Comment (by anonymous):

 Replying to [comment:16 serialx]:
 > What about the CJK languages?
 >
 > I think something must be done with the CJK languages seperately.

 as for CJK languages i prefer use encodeURI to encode those CJK char:
 in function URLify
     s = s.replace(/^\s+|\s+$/g, ''); // trim leading/trailing spaces
     s = s.replace(/[-\s]+/g, '-');   // convert spaces to hyphens
     s = encodeURI(s);
     s = s.replace(/[^-\w\s%]/g, '');  // remove unneeded chars #besides# %
     s = s.toLowerCase();             // convert to lowercase

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2282#comment:17>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to