1 files changed, 16 insertions, 0 deletions
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
|