diff --git a/irclog.py b/irclog.py index 5578f5f..98e1b70 100644 --- a/irclog.py +++ b/irclog.py @@ -937,7 +937,7 @@ class WebServer: if hidden: continue lines.append(f'{"(PW) " if auth else ""}{html.escape(channel)} (today's log, search)') - return aiohttp.web.Response(text = f'IRC logs{"
".join(lines)}', content_type = 'text/html') + return aiohttp.web.Response(text = f'IRC logs{"
".join(lines)}', content_type = 'text/html; charset=UTF-8') async def get_status(self, request): self.logger.info(f'Received request {id(request)} from {request.remote!r} for {request.path!r}') @@ -964,7 +964,7 @@ class WebServer: '', '' ]), - content_type = 'text/html' + content_type = 'text/html; charset=UTF-8' ) def _file_iter_with_path(self, fn, path): @@ -1059,7 +1059,7 @@ class WebServer: '', '', ]).encode('utf-8', errors = 'surrogateescape'), - content_type = 'text/html' + content_type = 'text/html; charset=UTF-8' ) async def log_redirect_today(self, request): @@ -1099,7 +1099,7 @@ class WebServer: '', '' ]), - content_type = 'text/html' + content_type = 'text/html; charset=UTF-8' ) # Run the search with grep, limiting memory use, output size, and runtime and setting the niceness. @@ -1201,7 +1201,7 @@ class WebServer: '', '' ]).encode('utf-8', errors = 'surrogateescape'), - content_type = 'text/html' + content_type = 'text/html; charset=UTF-8' )