Skip to content

Commit

Permalink
Add error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Dec 17, 2024
1 parent 42611ae commit 1a30745
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Fika.Core/FikaPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,14 @@ public IEnumerator WaitForLocales(Task __result)

private string CleanConfigString(string header)
{
string original = string.Copy(header);
string[] forbiddenChars = ["\n", "\t", "\\", "\"", "'", "[", "]"];
foreach (string item in forbiddenChars)
foreach (string character in forbiddenChars)
{
if (header.Contains(item))
if (header.Contains(character))
{
header.Replace(item, "");
FikaLogger.LogWarning($"Header {original} contains an illegal character: {character}\nReport this to the developers!");
header.Replace(character, "");
}
}

Expand Down

0 comments on commit 1a30745

Please sign in to comment.