Files
Kayori 755c047693 Platform, plugin & account UX improvements
- Refactor handler dispatch to use a parsed GameModel instead of raw
  model strings (Handler.cs, HandlerService.cs, new GameModel.cs)
- Add a Unity asset-extraction subsystem (Abstractions/Extractors/Unity)
- Add WriteEventLogHandler, XrpcDouble serialization type
- Rename EaCoin*Handler -> *EaCoinHandler for naming consistency
- Add PIN/username update and forgot/reset password flows, with a
  console-logging IEmailSender until real email is wired up
- Add a settings page and a theming pass (theme tokens, tailwind config)
- Add plugin nav/route/UI-manifest frontend types
2026-09-06 15:12:50 +02:00

20 lines
635 B
C#

using System.Text.RegularExpressions;
namespace Abstractions.Extractors.Unity.Helpers;
/// <summary>Strips characters that aren't safe in a filename and collapses whitespace to underscores.</summary>
public static partial class FileNameSanitizer
{
[GeneratedRegex("""[<>:"/\\|?*]""")]
private static partial Regex InvalidCharsRegex();
public static string Sanitize(string name)
{
var saneName = InvalidCharsRegex().Replace(name, "_");
saneName = saneName.Replace(' ', '_');
saneName = saneName.Trim('_').Trim();
return string.IsNullOrEmpty(saneName) ? "Untitled" : saneName;
}
}