mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-08 00:22:51 +01:00
trimming alert title/message
This commit is contained in:
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user