summaryrefslogtreecommitdiff
path: root/Services/WebServer
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-07-27 19:28:15 +0200
committerAndreas Kling <kling@serenityos.org>2020-07-27 19:57:20 +0200
commitefa117f8011306042871e4dd6d3d48b84fec824a (patch)
treec5519b9871fc3d2925222558c1a6f4ccfab5856f /Services/WebServer
parenta2b40de0cc902a71666b1b1034f103e6a8b69c7d (diff)
downloadserenity-efa117f8011306042871e4dd6d3d48b84fec824a.zip
WebServer: Use urlencode() in directory listings
Diffstat (limited to 'Services/WebServer')
-rw-r--r--Services/WebServer/Client.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Services/WebServer/Client.cpp b/Services/WebServer/Client.cpp
index 2de4c53fb6..22864f2379 100644
--- a/Services/WebServer/Client.cpp
+++ b/Services/WebServer/Client.cpp
@@ -25,6 +25,7 @@
*/
#include "Client.h"
+#include <AK/URLParser.h>
#include <AK/LexicalPath.h>
#include <AK/StringBuilder.h>
#include <LibCore/DateTime.h>
@@ -172,8 +173,7 @@ void Client::handle_directory_listing(const String& requested_path, const String
while (dt.has_next()) {
auto name = dt.next_path();
builder.append("<a href=\"");
- // FIXME: urlencode
- builder.append(name);
+ builder.append(urlencode(name));
builder.append("\">");
builder.append(escape_html_entities(name));
builder.append("</a>");