- Timestamp:
- 07/29/2016 01:18:06 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/trac.wordpress.org/templates/site-ticket.html
r3147 r3736 34 34 import re 35 35 def wporg_sanitize_user_nicename(str): 36 str = str.lower() 37 str = re.sub(r'[^%a-z0-9\x80-\xff _-]', '', str) 38 str = str.strip() 39 str = re.sub(r'\s+', '-', str) 40 str = re.sub(r'-+', '-', str) 41 str = re.sub(r'_+', '_', str) 36 try: 37 str = str.lower() 38 str = re.sub(r'[^%a-z0-9\x80-\xff _-]', '', str) 39 str = str.strip() 40 str = re.sub(r'\s+', '-', str) 41 str = re.sub(r'-+', '-', str) 42 str = re.sub(r'_+', '_', str) 43 except AttributeError: 44 pass 42 45 return str; 43 46 ?>
Note: See TracChangeset
for help on using the changeset viewer.