Skip to content

Commit

Permalink
html-writer: Use HTML5 instead of XHTML 1.0
Browse files Browse the repository at this point in the history
Fixes: csutils#177
Closes: csutils#179
  • Loading branch information
jamacku authored and kdudka committed May 13, 2024
1 parent ff6d179 commit f5bcbe0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/lib/writer-html.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ namespace HtmlLib {
void initHtml(std::ostream &str, std::string title) {
escapeText(title);

str << "<?xml version='1.0' encoding='utf-8'?>\n\
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' \
'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>\n\
<html xmlns='http://www.w3.org/1999/xhtml'>\n\
str << "<!DOCTYPE html>\n\
<html>\n\
<head><title>" << title << "</title></head>\n\
<body style='background: white;'>\n<h1>" << title << "</h1>\n";
}
Expand Down
5 changes: 2 additions & 3 deletions tests/cshtml/0001-smoke/scan-results.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<!DOCTYPE html>
<html>
<head><title>curl-7.60.0-1.el8+7</title></head>
<body style='background: white;'>
<h1>curl-7.60.0-1.el8+7</h1>
Expand Down
5 changes: 2 additions & 3 deletions tests/cshtml/0002-cwe-names/scan-results.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<!DOCTYPE html>
<html>
<head><title>curl-7.60.0-1.el8+7</title></head>
<body style='background: white;'>
<h1>curl-7.60.0-1.el8+7</h1>
Expand Down

0 comments on commit f5bcbe0

Please sign in to comment.