mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 08:28:39 +00:00
Fix text wrap and symbols not being decoded (#324)
This commit is contained in:
parent
c0df2c302f
commit
7c13d51024
4 changed files with 11 additions and 9 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
@using System.Web
|
||||||
@using LBPUnion.ProjectLighthouse
|
@using LBPUnion.ProjectLighthouse
|
||||||
@using LBPUnion.ProjectLighthouse.Configuration
|
@using LBPUnion.ProjectLighthouse.Configuration
|
||||||
@using LBPUnion.ProjectLighthouse.PlayerData
|
@using LBPUnion.ProjectLighthouse.PlayerData
|
||||||
|
@ -10,8 +11,8 @@
|
||||||
|
|
||||||
await using Database database = new();
|
await using Database database = new();
|
||||||
|
|
||||||
string slotName = string.IsNullOrEmpty(Model.Name) ? "Unnamed Level" : Model.Name;
|
string slotName = HttpUtility.HtmlDecode(string.IsNullOrEmpty(Model!.Name) ? "Unnamed Level" : Model.Name);
|
||||||
|
|
||||||
bool isMobile = (bool?)ViewData["IsMobile"] ?? false;
|
bool isMobile = (bool?)ViewData["IsMobile"] ?? false;
|
||||||
bool mini = (bool?)ViewData["IsMini"] ?? false;
|
bool mini = (bool?)ViewData["IsMini"] ?? false;
|
||||||
|
|
||||||
|
|
|
@ -4,15 +4,14 @@
|
||||||
@using LBPUnion.ProjectLighthouse.Configuration
|
@using LBPUnion.ProjectLighthouse.Configuration
|
||||||
@using LBPUnion.ProjectLighthouse.Extensions
|
@using LBPUnion.ProjectLighthouse.Extensions
|
||||||
@using LBPUnion.ProjectLighthouse.PlayerData.Reviews
|
@using LBPUnion.ProjectLighthouse.PlayerData.Reviews
|
||||||
@using LBPUnion.ProjectLighthouse.Types
|
|
||||||
@model LBPUnion.ProjectLighthouse.Servers.Website.Pages.SlotPage
|
@model LBPUnion.ProjectLighthouse.Servers.Website.Pages.SlotPage
|
||||||
|
|
||||||
@{
|
@{
|
||||||
Layout = "Layouts/BaseLayout";
|
Layout = "Layouts/BaseLayout";
|
||||||
Model.ShowTitleInPage = false;
|
Model.ShowTitleInPage = false;
|
||||||
|
|
||||||
Model.Title = Model.Slot?.Name ?? "";
|
Model.Title = HttpUtility.HtmlDecode(Model.Slot?.Name ?? "");
|
||||||
Model.Description = Model.Slot?.Description ?? "";
|
Model.Description = HttpUtility.HtmlDecode(Model.Slot?.Description ?? "");
|
||||||
|
|
||||||
bool isMobile = this.Request.IsMobile();
|
bool isMobile = this.Request.IsMobile();
|
||||||
}
|
}
|
||||||
|
@ -38,15 +37,14 @@
|
||||||
<div class="eight wide column">
|
<div class="eight wide column">
|
||||||
<div class="ui blue segment">
|
<div class="ui blue segment">
|
||||||
<h2>Description</h2>
|
<h2>Description</h2>
|
||||||
<p>@HttpUtility.HtmlDecode(string.IsNullOrEmpty(Model.Slot?.Description) ? "This level has no description." : Model.Slot.Description)</p>
|
<p style="overflow-wrap: anywhere">@HttpUtility.HtmlDecode(string.IsNullOrEmpty(Model.Slot?.Description) ? "This level has no description." : Model.Slot.Description)</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="eight wide column">
|
<div class="eight wide column">
|
||||||
<div class="ui red segment">
|
<div class="ui red segment">
|
||||||
<h2>Tags</h2>
|
<h2>Tags</h2>
|
||||||
@{
|
@{
|
||||||
string[] authorLabels = Model.Slot?.AuthorLabels.Split(",") ?? new string[]
|
string[] authorLabels = Model.Slot?.AuthorLabels.Split(",") ?? new string[]{};
|
||||||
{};
|
|
||||||
if (authorLabels.Length == 1) // ..?? ok c#
|
if (authorLabels.Length == 1) // ..?? ok c#
|
||||||
{
|
{
|
||||||
<p>This level has no tags.</p>
|
<p>This level has no tags.</p>
|
||||||
|
|
|
@ -142,9 +142,11 @@ public class User
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string BannedReason { get; set; }
|
public string BannedReason { get; set; }
|
||||||
|
|
||||||
|
#nullable enable
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string? ApprovedIPAddress { get; set; }
|
public string? ApprovedIPAddress { get; set; }
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
public string Serialize(GameVersion gameVersion = GameVersion.LittleBigPlanet1)
|
public string Serialize(GameVersion gameVersion = GameVersion.LittleBigPlanet1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,6 +27,7 @@ canvas.hide-subjects {
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue