Update HtmlStringUtilities.cs

This commit is contained in:
Søren Kottal
2018-08-28 20:18:12 +02:00
committed by GitHub
parent c743ac760d
commit ba22ac4e83

View File

@@ -20,9 +20,9 @@ namespace Umbraco.Web
/// </summary>
/// <param name="text">The text.</param>
/// <returns>The text with text line breaks replaced with html linebreaks (<br/>)</returns>
public string ReplaceLineBreaksForHtml(string text)
public HtmlString ReplaceLineBreaksForHtml(string text)
{
return text.Replace("\r\n", @"<br />").Replace("\n", @"<br />").Replace("\r", @"<br />");
return new HtmlString(text.Replace("\r\n", @"<br />").Replace("\n", @"<br />").Replace("\r", @"<br />"));
}
public HtmlString StripHtmlTags(string html, params string[] tags)