From e38479d463771b63edaddf81009f62ef52c4ccdc Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Mon, 19 Sep 2022 16:30:19 +0300 Subject: [PATCH] Make lowercasing in system notifications a bit safer Closes #935 --- .../Exporting/Writers/Html/MessageGroupTemplate.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DiscordChatExporter.Core/Exporting/Writers/Html/MessageGroupTemplate.cshtml b/DiscordChatExporter.Core/Exporting/Writers/Html/MessageGroupTemplate.cshtml index f1e236ef..530511ad 100644 --- a/DiscordChatExporter.Core/Exporting/Writers/Html/MessageGroupTemplate.cshtml +++ b/DiscordChatExporter.Core/Exporting/Writers/Html/MessageGroupTemplate.cshtml @@ -71,13 +71,13 @@ @userNick @{/* System notification content */} - @if(message.Kind == MessageKind.ChannelPinnedMessage) + @if (message.Kind == MessageKind.ChannelPinnedMessage) { pinned a message to this channel. } - else + else if (!string.IsNullOrWhiteSpace(message.Content)) { @(char.ToLowerInvariant(message.Content[0]) + message.Content[1..]) }