Skip to content

Commit 2d34027

Browse files
committed
Update Package/TxtPackage.cs
1 parent fedb4e2 commit 2d34027

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Package/TxtPackage.cs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Text;
44
using System.IO;
55
using System.Text.RegularExpressions;
66
using iTextSharp.text;
77
using iTextSharp.text.pdf;
88

9-
//http://www.cnblogs.com/CareySon/archive/2011/11/07/2239017.html
10-
119
namespace ExportBlog
1210
{
1311
public class TxtPackage
@@ -121,9 +119,9 @@ private string GetContent(FeedEntity entity)
121119
}
122120

123121
string html = entity.Content;
124-
html = reg_br.Replace(html, "\r\n");
122+
html = reg_br.Replace(html, "\n");
125123
html = reg_html.Replace(html, string.Empty);
126-
html = App.ToHtmlDecoded(html);
124+
html = App.ToHtmlDecoded(html).Replace("\r", string.Empty).Replace("\n", "\r\n");
127125

128126
return html;
129127
}

0 commit comments

Comments
 (0)