Ticket #10254: unicodefn.diff
File unicodefn.diff, 505 bytes (added by , 16 years ago) |
---|
-
django/utils/text.py
122 122 u'johns_portrait_in_2004.jpg' 123 123 """ 124 124 s = force_unicode(s).strip().replace(' ', '_') 125 return re.sub(r' [^-A-Za-z0-9_.]', '', s)125 return re.sub(r'(?u)[^-\w.]', '', s) 126 126 get_valid_filename = allow_lazy(get_valid_filename, unicode) 127 127 128 128 def get_text_list(list_, last_word=ugettext_lazy(u'or')):