1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

WebServer: Add charset declaration to directory listings

This commit is contained in:
Maciej 2022-01-14 17:14:41 +01:00 committed by Andreas Kling
parent 8bc1a9e946
commit 08e5c6f349

View file

@ -248,7 +248,8 @@ ErrorOr<void> Client::handle_directory_listing(String const& requested_path, Str
builder.append("<!DOCTYPE html>\n");
builder.append("<html>\n");
builder.append("<head><title>Index of ");
builder.append("<head><meta charset=\"utf-8\">\n");
builder.append("<title>Index of ");
builder.append(escape_html_entities(requested_path));
builder.append("</title><style>\n");
builder.append(".folder { width: 16px; height: 16px; background-image: url('data:image/png;base64,");