From ca7f35dd5efbb5603bfbc044dc3f02fd1f274e34 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Wed, 17 Sep 2014 00:28:19 -0400 Subject: [PATCH] trimming alert title/message --- public/src/modules/alerts.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/src/modules/alerts.js b/public/src/modules/alerts.js index 83e4daa833..bdf55ae917 100644 --- a/public/src/modules/alerts.js +++ b/public/src/modules/alerts.js @@ -2,12 +2,13 @@ /* globals define, translator, templates */ define('alerts', function() { - var module = {}; module.alert = function (params) { params.alert_id = 'alert_button_' + (params.alert_id ? params.alert_id : new Date().getTime()); - params.title = params.title || ''; + params.title = params.title.trim() || ''; + params.message = params.message.trim(); + params.location = params.location || 'right-top'; params.type = params.type || 'info';