Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Social Messaging Ignoring Line Breaks & Copyright Year #4166 #4186

Merged
merged 3 commits into from
Oct 13, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Allows line breaks to be displayed as entered by end-users
  • Loading branch information
WillStrohl committed Oct 10, 2020
commit 15ab5ada8b3e0cbff4bfe91cd92e4d4defca035c
Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@ public void Fill(IDataReader dr)
this.To = Null.SetNullString(dr["To"]);
this.From = Null.SetNullString(dr["From"]);
this.Subject = Null.SetNullString(dr["Subject"]);
this.Body = Null.SetNullString(dr["Body"]);
this.Body = HtmlUtils.ConvertToHtml(Null.SetNullString(dr["Body"]));
this.ConversationId = Null.SetNullInteger(dr["ConversationID"]);
this.ReplyAllAllowed = Null.SetNullBoolean(dr["ReplyAllAllowed"]);
this.SenderUserID = Convert.ToInt32(dr["SenderUserID"]);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information

@@ -145,7 +145,7 @@ private static string GetEmailItemContent(PortalSettings portalSettings, Message

var emailItemContent = itemTemplate;
emailItemContent = emailItemContent.Replace("[TITLE]", messageDetails.Subject);
emailItemContent = emailItemContent.Replace("[CONTENT]", messageDetails.Body);
emailItemContent = emailItemContent.Replace("[CONTENT]", HtmlUtils.ConvertToHtml(messageDetails.Body));
emailItemContent = emailItemContent.Replace("[PROFILEPICURL]", GetProfilePicUrl(portalSettings, authorId));
emailItemContent = emailItemContent.Replace("[PROFILEURL]", GetProfileUrl(portalSettings, authorId));
emailItemContent = emailItemContent.Replace("[DISPLAYNAME]", GetDisplayName(portalSettings, authorId));
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information

namespace DotNetNuke.Modules.CoreMessaging.Services
{
using System;
@@ -11,8 +11,9 @@ namespace DotNetNuke.Modules.CoreMessaging.Services
using System.Net.Http;
using System.Web;
using System.Web.Http;

using DotNetNuke.Common;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Portals;
using DotNetNuke.Entities.Users;
4 changes: 2 additions & 2 deletions DNN Platform/Modules/CoreMessaging/View.ascx
Original file line number Diff line number Diff line change
@@ -114,7 +114,7 @@
<dl>
<dt class="subject"><a href="#" data-bind="text: Subject, click: $root.getReplies"></a></dt>
<dd class="meta"><em><%=LocalizeString("From")%>: <a data-bind="text: From, attr: { href: SenderProfileUrl }"></a></em><br/><em><%=LocalizeString("SentTo")%>: <span data-bind=" text: To"></span></em></dd>
<dd class="message" data-bind="text: MessageAbstract"></dd>
<dd class="message" data-bind="html: MessageAbstract"></dd>
</dl>
</li>
<li class="ListCol-4">
@@ -176,7 +176,7 @@
<dd class="meta">
<em><a data-bind="text: SenderDisplayName, attr: { href: SenderProfileUrl }" aria-label="Display Name"></a></em>
</dd>
<dd class="message" data-bind="text: Body"></dd>
<dd class="message" data-bind="html: Body"></dd>
<dd class="attachements" data-bind="if: AttachmentCount > 0">
<strong><%=LocalizeString("Attachments")%>:</strong>
<ul data-bind="foreach: Attachments">