19 lines
415 B
Plaintext
19 lines
415 B
Plaintext
@page
|
|
@using System.IO
|
|
@model IndexModel
|
|
@{
|
|
ViewData["Title"] = $"webmusic on .NET {Environment.Version}";
|
|
}
|
|
@if (Model.Path.Contains("/..")) {
|
|
return;
|
|
}
|
|
@if (!Model.Path.EndsWith(".lrc")) {
|
|
Response.Redirect("/" + Request.QueryString);
|
|
return;
|
|
}
|
|
@{
|
|
Layout = "Shared/_LayoutNojs";
|
|
}
|
|
<h3>@Model.Path</h3>
|
|
<p>@Html.Raw((await System.IO.File.ReadAllTextAsync("music" + Model.Path)).Replace("\n", "<br/>"))</p>
|