Reading List Detail Overhaul + More Bugfixes and Polish (#3687)
Co-authored-by: Yongun Seong <yseong.p@gmail.com>
This commit is contained in:
parent
b2ee651fb8
commit
dad212bfb9
71 changed files with 5056 additions and 729 deletions
|
@ -14,6 +14,8 @@ public static partial class StringHelper
|
|||
private static partial Regex BrMultipleRegex();
|
||||
[GeneratedRegex(@"\s+")]
|
||||
private static partial Regex WhiteSpaceRegex();
|
||||
[GeneratedRegex("&#64;")]
|
||||
private static partial Regex HtmlEncodedAtSymbolRegex();
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
@ -52,4 +54,16 @@ public static partial class StringHelper
|
|||
|
||||
return SourceRegex().Replace(description, string.Empty).Trim();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces some HTML encoded characters in urls with the proper symbol. This is common in People Description's
|
||||
/// </summary>
|
||||
/// <param name="description"></param>
|
||||
/// <returns></returns>
|
||||
public static string? CorrectUrls(string? description)
|
||||
{
|
||||
if (string.IsNullOrEmpty(description)) return description;
|
||||
|
||||
return HtmlEncodedAtSymbolRegex().Replace(description, "@");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue