MS Bodytext, Bugfixing deleting

This commit is contained in:
Developer01
2025-04-10 17:46:33 +02:00
parent 7481691b4e
commit 8a9d5f92f3
19 changed files with 1028 additions and 63 deletions

View File

@@ -31,7 +31,7 @@ Public Class EmailData
EmailSubject = String.Empty
EmailType = pStatus
Message = pEnvelope.Message
Message = TextToHtml(pEnvelope.Message)
ReferenceID = pEnvelope.Id
ReferenceString = pEnvelope.Uuid
ReceiverName = pReceiver.Name
@@ -40,6 +40,22 @@ Public Class EmailData
SenderName = pEnvelope.User.FullName
EnvelopeTitle = pEnvelope.Title
End Sub
Public Function TextToHtml(input As String) As String
If String.IsNullOrEmpty(input) Then Return ""
' HTML-Encodierung der Sonderzeichen
Dim encoded As String = System.Net.WebUtility.HtmlEncode(input)
' Tabs in   umwandeln (z.B. 4 non-breaking spaces)
encoded = encoded.Replace(vbTab, "    ")
' Zeilenumbrüche in <br /> umwandeln
encoded = encoded.Replace(vbCrLf, "<br />") ' Windows
encoded = encoded.Replace(vbCr, "<br />") ' Mac alt
encoded = encoded.Replace(vbLf, "<br />") ' Unix/Linux
Return encoded
End Function
''' <summary>
''' Constructor for sending email to creator