Replace new line characters from the response name

...when the name was derived from the response text.
pull/5755/head
Aleksander Machniak 8 years ago
parent 41c70e162b
commit deec62915f

@ -4585,7 +4585,7 @@ function rcube_webmail()
return false; return false;
} }
if (!name) if (!name)
name = text.substring(0,40); name = text.replace(/[\r\n]+/g, ' ').substring(0,40);
var lock = ref.display_message(ref.get_label('savingresponse'), 'loading'); var lock = ref.display_message(ref.get_label('savingresponse'), 'loading');
ref.http_post('settings/responses', { _insert:1, _name:name, _text:text }, lock); ref.http_post('settings/responses', { _insert:1, _name:name, _text:text }, lock);

Loading…
Cancel
Save