Fix charset

This commit is contained in:
Laura Hausmann 2023-06-29 16:50:29 +02:00
parent 32d7e1c9cb
commit 9f595e98a3
Signed by: zotan
GPG key ID: D044E84C5BE01605
2 changed files with 4 additions and 4 deletions

View file

@ -2,7 +2,7 @@
@model IndexModel
@{
Layout = null;
Response.ContentType = "text/plain";
Response.ContentType = "text/plain; charset=utf-8";
}
@if (Model.Path.Contains("..")) {
return;
@ -12,4 +12,4 @@
}
@foreach (var file in Model.Files) {
@Html.Raw(file + "\n")
}
}

View file

@ -4,11 +4,11 @@
@{
var path = HttpUtility.UrlDecode(Request.QueryString.Value.TrimStart('?'));
Layout = null;
Response.ContentType = "text/plain";
Response.ContentType = "text/plain; charset=utf-8";
}
@if (Model.Path.Contains("..")) {
return;
}
@foreach (var file in Model.Files) {
@Html.Raw("https://" + Request.Host + "/" + Model.Fullpath + "/" + file.Replace("?", "%3F") + "\n")
}
}