Permalink
Browse files

Fix for tags and complex author urls

  • Loading branch information...
elpaso committed Oct 5, 2012
1 parent 58df195 commit 8d639b75730a04af06ce6cc9eb2ba7f4fefcc298
@@ -16,7 +16,7 @@ changelog=this is a very
very long multiline changelog
-tags=wkt,raster,hello world
+tags= wkt, raster,hello world, spaced tag , tag
tracker=http://bugs.itopen.it
homepage=http://www.itopen.it
@@ -242,7 +242,7 @@ def plugin_upload(request):
# Takes care of tags
if form.cleaned_data.get('tags'):
- plugin.tags.set(*form.cleaned_data.get('tags').split(','))
+ plugin.tags.set(*[t.strip() for t in form.cleaned_data.get('tags').split(',')])
version_data = {
'plugin' : plugin,
@@ -533,7 +533,7 @@ def _main_plugin_update(plugin, form):
plugin.email = form.cleaned_data['email']
plugin.description = form.cleaned_data['description']
if form.cleaned_data.get('tags'):
- plugin.tags.set(*form.cleaned_data.get('tags').split(','))
+ plugin.tags.set(*[strip(t) for t in form.cleaned_data.get('tags').split(',')])
if form.cleaned_data.get('homepage'):
plugin.homepage = form.cleaned_data.get('homepage')
else:

0 comments on commit 8d639b7

Please sign in to comment.