diff options
author | Rosandra Cuello <rosandra.cuello@gmail.com> | 2011-11-18 16:47:34 -0400 |
---|---|---|
committer | Rosandra Cuello <rosandra.cuello@gmail.com> | 2011-11-18 16:47:34 -0400 |
commit | c78b109580faa9a78c1b4007ae1ae932a3de35f7 (patch) | |
tree | b85a5c63512a461fec26bbabe539ce4af86c154d /askbot/templatetags | |
parent | d7ead064414efec0e0d049842459e1a4d8a99edd (diff) | |
download | askbot-c78b109580faa9a78c1b4007ae1ae932a3de35f7.tar.gz askbot-c78b109580faa9a78c1b4007ae1ae932a3de35f7.tar.bz2 askbot-c78b109580faa9a78c1b4007ae1ae932a3de35f7.zip |
fixed issue with page numbers and page_size, fixed issue with encoded tags, cleaned up leftovers
Diffstat (limited to 'askbot/templatetags')
-rw-r--r-- | askbot/templatetags/extra_filters.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/askbot/templatetags/extra_filters.py b/askbot/templatetags/extra_filters.py index 47825dee..7bf3a8af 100644 --- a/askbot/templatetags/extra_filters.py +++ b/askbot/templatetags/extra_filters.py @@ -5,6 +5,7 @@ from askbot import exceptions as askbot_exceptions from askbot import auth from askbot.conf import settings as askbot_settings from askbot.utils.slug import slugify +import urllib2 register = template.Library() @@ -182,11 +183,10 @@ def add_tag_to_url(query_string, param): flag = True type, value = tags.split(':') values = value.split('+') - if param in values: - return query_string - else: + if not urllib2.unquote(param) in values: values.append(param) - params[params.index(tags)] = 'tags:'+'+'.join(values) + values = [urllib2.quote(value) for value in values] + params[params.index(tags)] = 'tags:'+'+'.join(values) if not flag: author = [s for s in params if "author:" in s] |