staticweb: Generate HTML5 pages

HTML 4.01 is so 1999.

Closes-Bug: #2047679
Change-Id: Ic5a68998222709ab088caafe9dbea2b726db38c6
This commit is contained in:
Tim Burke 2024-01-04 21:55:03 -08:00
parent 365db20275
commit ac7eb8ac9d

View File

@ -240,8 +240,7 @@ class _StaticWebContext(WSGIContext):
'/'.join(groups[4:]))
if not config_true_value(self._listings):
body = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 ' \
'Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n' \
body = '<!DOCTYPE html>\n' \
'<html>\n' \
'<head>\n' \
'<title>Listing of %s</title>\n' % html_escape(label)
@ -286,8 +285,7 @@ class _StaticWebContext(WSGIContext):
resp = HTTPNotFound()(env, self._start_response)
return self._error_response(resp, env, start_response)
headers = {'Content-Type': 'text/html; charset=UTF-8'}
body = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 ' \
'Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n' \
body = '<!DOCTYPE html>\n' \
'<html>\n' \
' <head>\n' \
' <title>Listing of %s</title>\n' % \