Allow in stream names any character classified by Unicode as alphanumeric

Also correct a comment.

(imported from commit 5c03032b90dbaf38d880651004733e4399b422ee)
This commit is contained in:
Keegan McAllister 2012-10-22 12:58:39 -04:00
parent 189d42428a
commit 7cf8f842f7
1 changed files with 2 additions and 2 deletions

View File

@ -559,8 +559,8 @@ def json_remove_subscription(request):
return json_success({"data": sub_name})
def valid_stream_name(name):
# Streams must start with a letter or number.
return re.match("^[.a-zA-Z0-9][.a-z A-Z0-9_-]*$", name)
# Streams must start with a letter or number or a dot.
return re.match(r'^[\w.][\w. -]*$', name, flags=re.UNICODE)
@login_required_api_view
def api_subscribe(request, user_profile):