summaryrefslogtreecommitdiff
path: root/plugins/kolab_notes
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-10-13 07:27:54 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-10-13 07:27:54 (GMT)
commitab12a5c86780ce97a14612513fdb292d2f8e1a3c (patch)
tree1473eac8282bdabf7058cb3cef1172d39931bce3 /plugins/kolab_notes
parent22035945f202a3df44a1cfe364bf7a3c2723d7a9 (diff)
downloadroundcubemail-plugins-kolab-ab12a5c86780ce97a14612513fdb292d2f8e1a3c.tar.gz
Avoid false warnings about changed contents
Diffstat (limited to 'plugins/kolab_notes')
-rw-r--r--plugins/kolab_notes/notes.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/kolab_notes/notes.js b/plugins/kolab_notes/notes.js
index 911e8a7..09813fe 100644
--- a/plugins/kolab_notes/notes.js
+++ b/plugins/kolab_notes/notes.js
@@ -902,7 +902,7 @@ function rcube_kolab_notes_ui(settings)
$('.notetitle', rcmail.gui_objects.noteviewtitle).focus().select();
// read possibly re-formatted content back from editor for later comparison
- me.selected_note.description = editor.getContent({ format:'html' }).replace(/^<p><\/p>/, '');
+ me.selected_note.description = editor.getContent({ format:'html' }).replace(/^\s*(<p><\/p>\n*)?/, '');
is_html = true;
}
else {
@@ -1169,7 +1169,7 @@ function rcube_kolab_notes_ui(settings)
listselect = $('option:selected', rcmail.gui_objects.notebooks);
var savedata = {
title: trim($('.notetitle', rcmail.gui_objects.noteviewtitle).val()),
- description: editor ? editor.getContent({ format:'html' }).replace(/^<p><\/p>/, '') : $('#notecontent').val(),
+ description: editor ? editor.getContent({ format:'html' }).replace(/^\s*(<p><\/p>\n*)?/, '') : $('#notecontent').val(),
list: listselect.length ? listselect.val() : me.selected_note.list || me.selected_list,
uid: me.selected_note.uid,
tags: []