diff --git a/evernote2onenote/src/MainFrm.cs b/evernote2onenote/src/MainFrm.cs index 217da48..a05a23f 100644 --- a/evernote2onenote/src/MainFrm.cs +++ b/evernote2onenote/src/MainFrm.cs @@ -64,6 +64,9 @@ public partial class MainFrm : Form private readonly Regex _rxCdata = new Regex(@"", RegexOptions.IgnoreCase); private readonly Regex _rxCdata2 = new Regex(@"", RegexOptions.IgnoreCase); private readonly Regex _rxCdataInner = new Regex(@"\<\!\[CDATA\[(?.*)\]\]\>", RegexOptions.IgnoreCase | RegexOptions.Singleline); + private readonly Regex _rxEmptyCdata = new Regex(@"[\s\n]+\]\]>", RegexOptions.IgnoreCase); + private readonly Regex _rxEmptyCdata2 = new Regex(@"", RegexOptions.IgnoreCase); + private readonly Regex _rxEmptyCdata3 = new Regex(@"[\s\n]+\]\]>", RegexOptions.IgnoreCase); private readonly Regex _rxBodyStart = new Regex(@"/]*>", RegexOptions.IgnoreCase); private readonly Regex _rxBodyEnd = new Regex(@"\s*]]>", RegexOptions.IgnoreCase); private readonly Regex _rxBodyEmpty = new Regex(@"/]*/>\s*]]>", RegexOptions.IgnoreCase); @@ -551,6 +554,9 @@ private void ImportNotesToOnenote(List notesEvernote, string exportFile) htmlBody = _rxFontFamily.Replace(htmlBody, string.Empty); htmlBody = _rxStyle.Replace(htmlBody, "${text}"); htmlBody = _rxComment.Replace(htmlBody, string.Empty); + htmlBody = _rxEmptyCdata.Replace(htmlBody, string.Empty); + htmlBody = _rxEmptyCdata2.Replace(htmlBody, string.Empty); + htmlBody = _rxEmptyCdata3.Replace(htmlBody, string.Empty); htmlBody = _rxCdata.Replace(htmlBody, string.Empty); htmlBody = _rxCdata2.Replace(htmlBody, string.Empty); htmlBody = _rxDtd.Replace(htmlBody, string.Empty);