# HG changeset patch # User Mads Kiilerich # Date 2013-12-10 19:30:37 # Node ID 6b97c7e8d03c7a8d32d11fe86a6a5bbc17e7d792 # Parent 0f4402c519ff8e8bcf431b83ccc2af46cfc49753 settings: strip hook names - they do not work if they have extra whitespace diff --git a/kallithea/controllers/admin/settings.py b/kallithea/controllers/admin/settings.py --- a/kallithea/controllers/admin/settings.py +++ b/kallithea/controllers/admin/settings.py @@ -395,6 +395,7 @@ class SettingsController(BaseController) 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')