﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
721	isAlphaNumericURL validator should allow dashes.	Esaj	Adrian Holovaty	"django.core.validators.isAlphaNumericURL should allow dashes.  Dashes in URLs are apparently more search-engine friendly, and they don't do any harm.

{{{
Index: django/core/validators.py
===================================================================
--- django/core/validators.py   (revision 1066)
+++ django/core/validators.py   (working copy)
@@ -13,7 +13,7 @@
 _datere = r'\d{4}-((?:0?[1-9])|(?:1[0-2]))-((?:0?[1-9])|(?:[12][0-9])|(?:3[0-1]))'
 _timere = r'(?:[01]?[0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9])?'
 alnum_re = re.compile(r'^\w+$')
-alnumurl_re = re.compile(r'^[\w/]+$')
+alnumurl_re = re.compile(r'^[-\w/]+$')
 ansi_date_re = re.compile('^%s$' % _datere)
 ansi_time_re = re.compile('^%s$' % _timere)
 ansi_datetime_re = re.compile('^%s %s$' % (_datere, _timere))
@@ -58,7 +58,7 @@

 def isAlphaNumericURL(field_data, all_data):
     if not alnumurl_re.search(field_data):
-        raise ValidationError, ""This value must contain only letters, numbers, underscores or slashes.""
+        raise ValidationError, ""This value must contain only letters, numbers, underscores, dashes or slashes.""

 def isSlug(field_data, all_data):
     if not slug_re.search(field_data):
}}}"	defect	closed	Validators		normal	fixed			Unreviewed	0	0	0	0	0	0
