Merge branch 'patch-4' of git://github.com/HarveyWilliams/Umbraco-CMS into HarveyWilliams-patch-4
This commit is contained in:
@@ -4,6 +4,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Text.RegularExpressions;
|
||||
using HtmlAgilityPack;
|
||||
|
||||
namespace Umbraco.Web
|
||||
@@ -23,7 +24,7 @@ namespace Umbraco.Web
|
||||
/// <returns>The text with text line breaks replaced with html linebreaks (<br/>)</returns>
|
||||
public string ReplaceLineBreaksForHtml(string text)
|
||||
{
|
||||
return text.Replace("\n", "<br/>\n");
|
||||
return Regex.Replace(text, @"(\r\n?|\n)", "<br />$0");
|
||||
}
|
||||
|
||||
public HtmlString StripHtmlTags(string html, params string[] tags)
|
||||
@@ -241,4 +242,4 @@ namespace Umbraco.Web
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user