changeset 4305:6b97c7e8d03c

settings: strip hook names - they do not work if they have extra whitespace
author Mads Kiilerich <madski@unity3d.com>
date Tue, 10 Dec 2013 19:30:37 +0100
parents 0f4402c519ff
children 4541ef6d33d3
files kallithea/controllers/admin/settings.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/admin/settings.py	Tue Dec 10 19:30:37 2013 +0100
+++ b/kallithea/controllers/admin/settings.py	Tue Dec 10 19:30:37 2013 +0100
@@ -395,6 +395,7 @@
                 hook_id = request.POST.get('hook_id')
 
                 try:
+                    ui_key = ui_key and ui_key.strip()
                     if ui_value and ui_key:
                         Ui.create_or_update_hook(ui_key, ui_value)
                         h.flash(_('Added new hook'), category='success')