From 7cf8f842f7dd6cc116203e961bbef4608d829c1f Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Mon, 22 Oct 2012 12:58:39 -0400 Subject: [PATCH] Allow in stream names any character classified by Unicode as alphanumeric Also correct a comment. (imported from commit 5c03032b90dbaf38d880651004733e4399b422ee) --- zephyr/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zephyr/views.py b/zephyr/views.py index 436bcb61fe..ce504233bb 100644 --- a/zephyr/views.py +++ b/zephyr/views.py @@ -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):