From f5bcbe00a81faa1a4172f6c30ef1eeccd21f91fd Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Fri, 10 May 2024 07:40:31 +0200 Subject: [PATCH] html-writer: Use HTML5 instead of XHTML 1.0 Fixes: https://github.com/csutils/csdiff/issues/177 Closes: https://github.com/csutils/csdiff/pull/179 --- src/lib/writer-html.cc | 6 ++---- tests/cshtml/0001-smoke/scan-results.html | 5 ++--- tests/cshtml/0002-cwe-names/scan-results.html | 5 ++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/lib/writer-html.cc b/src/lib/writer-html.cc index f13f5ae6..291ff46a 100644 --- a/src/lib/writer-html.cc +++ b/src/lib/writer-html.cc @@ -50,10 +50,8 @@ namespace HtmlLib { void initHtml(std::ostream &str, std::string title) { escapeText(title); - str << "\n\ -\n\ -\n\ + str << "\n\ +\n\ " << title << "\n\ \n

" << title << "

\n"; } diff --git a/tests/cshtml/0001-smoke/scan-results.html b/tests/cshtml/0001-smoke/scan-results.html index b849915c..472424e6 100644 --- a/tests/cshtml/0001-smoke/scan-results.html +++ b/tests/cshtml/0001-smoke/scan-results.html @@ -1,6 +1,5 @@ - - - + + curl-7.60.0-1.el8+7

curl-7.60.0-1.el8+7

diff --git a/tests/cshtml/0002-cwe-names/scan-results.html b/tests/cshtml/0002-cwe-names/scan-results.html index af3392fd..75dce62b 100644 --- a/tests/cshtml/0002-cwe-names/scan-results.html +++ b/tests/cshtml/0002-cwe-names/scan-results.html @@ -1,6 +1,5 @@ - - - + + curl-7.60.0-1.el8+7

curl-7.60.0-1.el8+7