diff options
author | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-06-14 23:14:43 (GMT) |
---|---|---|
committer | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-06-14 23:14:43 (GMT) |
commit | e555b7e2d85c42d4de564729088bd6fca7d4a12a (patch) | |
tree | ad6f82d73df3e335c41e0ab333b75a8c60ef97f3 /webapp/polls/templatetags | |
parent | 278f499e4fa26a1b5d301aec9f0f958e4cfe96f8 (diff) |
BugFix: ignore latin-1 charactes and others symbols not matched for js array key
Diffstat (limited to 'webapp/polls/templatetags')
-rw-r--r-- | webapp/polls/templatetags/poll_tags.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/webapp/polls/templatetags/poll_tags.py b/webapp/polls/templatetags/poll_tags.py index d8398ae..c28d237 100644 --- a/webapp/polls/templatetags/poll_tags.py +++ b/webapp/polls/templatetags/poll_tags.py @@ -1,9 +1,7 @@ from django import template from django.template.loader import render_to_string -from utils.strings import multiple_replace - -from polls.models import WIDGET_TYPES, WITH_OPTIONS, WITH_IMAGES, Field +from polls.models import WIDGET_TYPES, WITH_OPTIONS, WITH_IMAGES, Field, Poll register = template.Library() @@ -31,6 +29,4 @@ def render_structure(context, structure): @register.filter(name="clean_question") def clean_question(question_name): - to_replace = [(" ", "_"), ("#", ''), (".", "_"), (":", "")] - question_name = question_name.lower() - return multiple_replace(question_name, to_replace) + return Poll.clean_question(question_name) |