Fix ascii characters

This commit is contained in:
Laura Hausmann 2019-08-14 00:26:46 +02:00
parent 46bd835f69
commit 142e529b4e
No known key found for this signature in database
GPG key ID: 1720DF2EC8974C2D
2 changed files with 2 additions and 3 deletions

View file

@ -18,7 +18,7 @@
{
@foreach (var file in Model.files)
{
@Html.Raw(Request.Scheme + "://" + Request.Host + "/" + Model.fullpath + "/" + file+"\n")
@Html.Raw(Request.Scheme + "://" + Request.Host + "/" + Model.fullpath + "/" + file.Replace("?", "%3F") +"\n")
}
}
else

View file

@ -22,8 +22,7 @@ namespace webmusic.Pages
{
if (Request.QueryString.HasValue)
path = HttpUtility.UrlDecode(Request.QueryString.Value.Remove(0,1)
.Replace("+", "%2B")
.Replace("?", "%3F"));
.Replace("+", "%2B"));
if (path.EndsWith(".m3u"))
path = path.Substring(0, path.Length - 4);
if (path.Contains(".."))