From ba22ac4e839538c8648c989e3acaec59421982df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Kottal?= Date: Tue, 28 Aug 2018 20:18:12 +0200 Subject: [PATCH 1/2] Update HtmlStringUtilities.cs --- src/Umbraco.Web/HtmlStringUtilities.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/HtmlStringUtilities.cs b/src/Umbraco.Web/HtmlStringUtilities.cs index 26ee4c6557..be14df8e5a 100644 --- a/src/Umbraco.Web/HtmlStringUtilities.cs +++ b/src/Umbraco.Web/HtmlStringUtilities.cs @@ -20,9 +20,9 @@ namespace Umbraco.Web /// /// The text. /// The text with text line breaks replaced with html linebreaks (
)
- public string ReplaceLineBreaksForHtml(string text) + public HtmlString ReplaceLineBreaksForHtml(string text) { - return text.Replace("\r\n", @"
").Replace("\n", @"
").Replace("\r", @"
"); + return new HtmlString(text.Replace("\r\n", @"
").Replace("\n", @"
").Replace("\r", @"
")); } public HtmlString StripHtmlTags(string html, params string[] tags) From a6fd377f31e8642add079402b934dcf94532a6b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Kottal?= Date: Tue, 28 Aug 2018 20:21:49 +0200 Subject: [PATCH 2/2] Update UmbracoHelper.cs --- src/Umbraco.Web/UmbracoHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/UmbracoHelper.cs b/src/Umbraco.Web/UmbracoHelper.cs index bf51d8b6af..91cd388317 100644 --- a/src/Umbraco.Web/UmbracoHelper.cs +++ b/src/Umbraco.Web/UmbracoHelper.cs @@ -875,7 +875,7 @@ namespace Umbraco.Web /// /// The text. /// The text with text line breaks replaced with html linebreaks (
)
- public string ReplaceLineBreaksForHtml(string text) + public IHtmlString ReplaceLineBreaksForHtml(string text) { return StringUtilities.ReplaceLineBreaksForHtml(text); }