From 77a609758bb80bac9497d2e3988550f8be578407 Mon Sep 17 00:00:00 2001 From: Rory& Date: Mon, 23 Feb 2026 02:03:20 +0100 Subject: Initial commit --- ReferenceClientProxyImplementation/Helpers/HtmlUtils.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ReferenceClientProxyImplementation/Helpers/HtmlUtils.cs (limited to 'ReferenceClientProxyImplementation/Helpers/HtmlUtils.cs') diff --git a/ReferenceClientProxyImplementation/Helpers/HtmlUtils.cs b/ReferenceClientProxyImplementation/Helpers/HtmlUtils.cs new file mode 100644 index 0000000..a8ee447 --- /dev/null +++ b/ReferenceClientProxyImplementation/Helpers/HtmlUtils.cs @@ -0,0 +1,16 @@ +using AngleSharp.Html; +using AngleSharp.Html.Parser; + +namespace ReferenceClientProxyImplementation.Helpers; + +public class HtmlUtils { + public static string CleanupHtml(string input) { + var parser = new HtmlParser(); + + var document = parser.ParseDocument(input); + + var sw = new StringWriter(); + document.ToHtml(sw, new PrettyMarkupFormatter()); + return sw.ToString(); + } +} \ No newline at end of file -- cgit 1.5.1