From e6607c5a5bfa027fcb51d35341924006824e0318 Mon Sep 17 00:00:00 2001 From: James Gunn Date: Tue, 17 Sep 2024 11:30:03 +0100 Subject: [PATCH] Remove ShyEmail function (#1492) --- .../HtmlHelperExtensions.cs | 17 ----------------- .../Pages/Users/Index.cshtml | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/HtmlHelperExtensions.cs diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/HtmlHelperExtensions.cs b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/HtmlHelperExtensions.cs deleted file mode 100644 index b04680b71..000000000 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/HtmlHelperExtensions.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Text.RegularExpressions; -using Microsoft.AspNetCore.Html; -using Microsoft.AspNetCore.Mvc.Rendering; - -namespace TeachingRecordSystem.SupportUi; - -public static partial class HtmlHelperExtensions -{ - public static HtmlString ShyEmail(this IHtmlHelper htmlHelper, string email) - { - var escaped = new HtmlString(email).Value!; - return new HtmlString(string.Join("­", ShyEmailSplitPattern().Matches(escaped))); - } - - [GeneratedRegex("\\W?\\w+")] - private static partial Regex ShyEmailSplitPattern(); -} diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Users/Index.cshtml b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Users/Index.cshtml index cf6d61fb5..874134096 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Users/Index.cshtml +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Users/Index.cshtml @@ -22,7 +22,7 @@ @user.Name - @Html.ShyEmail(user.Email!) + @user.Email } }