You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like the replace-method don't replace the " " when this character is there, in our case the CPU usage went to 99% after hitting a topic in the forum with this sign. Removing the sign from the post content i the database OR removing the while loop above solved the issue.
Hi!
Just wanted to share a strange issue that we had.
Some visitor on our forum posted this symbol as content ➗ , which actually made the code end up in an endless loop on this row:
mvcforum/MVCForum.Core/Utilities/StringUtils.cs
Line 383 in a336249
It seems like the replace-method don't replace the " " when this character is there, in our case the CPU usage went to 99% after hitting a topic in the forum with this sign. Removing the sign from the post content i the database OR removing the while loop above solved the issue.
I also don't understand why the while loop is there? The Replace-method in C# will replace all occurrences of the search string in one call (https://docs.microsoft.com/en-us/dotnet/api/system.string.replace?view=netframework-4.7.2).
So to avoid these ever lasting loops I would remove the while-loop from the methods that is counting words.
All the best!
// Markus
The text was updated successfully, but these errors were encountered: