Show prettyfied ATA IDENTIFY on delete and details.

This commit is contained in:
2019-11-09 21:27:59 +00:00
parent d83f5fa093
commit 77090f12c6
3 changed files with 22 additions and 19 deletions

View File

@@ -0,0 +1,12 @@
using System.Text.RegularExpressions;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace DiscImageChef.Server.Core
{
public static class HtmlHelpers
{
public static string EncodedMultiLineText(this IHtmlHelper<CommonTypes.Metadata.Ata> helper, string text) =>
string.IsNullOrEmpty(text) ? string.Empty
: Regex.Replace(helper.Encode(text), "&#xD;&#xA;|&#xA;|&#xD;", "<br/>");
}
}