Verbesserung der Benutzeroberfläche und Funktionalität des Sprachauswahl-Dropdown-Menüs

This commit is contained in:
Developer 02
2024-05-13 16:27:46 +02:00
parent ef6e921451
commit db83f25d57
9 changed files with 154 additions and 48 deletions

View File

@@ -1,4 +1,5 @@
using Ganss.Xss;
using Microsoft.Extensions.Localization;
using System.Text.Encodings.Web;
namespace EnvelopeGenerator.Web
@@ -7,6 +8,10 @@ namespace EnvelopeGenerator.Web
{
public static string? TryEncode(this string? value, UrlEncoder encoder) => value is null ? value : encoder.Encode(value);
public static string? TryEncode(this LocalizedString? value, UrlEncoder encoder) => value is null ? null : encoder.Encode(value);
public static string? TrySanitize(this string? html, HtmlSanitizer sanitizer) => html is null ? html : sanitizer.Sanitize(html);
public static string? TrySanitize(this LocalizedString? html, HtmlSanitizer sanitizer) => html is null ? null : sanitizer.Sanitize(html);
}
}