Fix — HTML entity rendering across 60 views

Razor's @() expression auto-encodes &, turning — into — which
rendered as literal text in the browser. Wrapped all such expressions in
@Html.Raw() so the em-dash entity is passed through unescaped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 09:27:45 -04:00
parent f018653c18
commit 64a9c1531b
60 changed files with 155 additions and 155 deletions
@@ -179,12 +179,12 @@
<div class="col-md-4">
<label class="text-muted small mb-1">Due Date</label>
<p class="mb-0 @(Model.Status == InvoiceStatus.Overdue ? "text-danger fw-bold" : "")">
@(Model.DueDate.HasValue ? Model.DueDate.Value.ToString("MMMM d, yyyy") : "&mdash;")
@Html.Raw(Model.DueDate.HasValue ? Model.DueDate.Value.ToString("MMMM d, yyyy") : "&mdash;")
</p>
</div>
<div class="col-md-4">
<label class="text-muted small mb-1">Sent Date</label>
<p class="mb-0">@(Model.SentDate.HasValue ? Model.SentDate.Value.ToString("MMMM d, yyyy") : "&mdash;")</p>
<p class="mb-0">@Html.Raw(Model.SentDate.HasValue ? Model.SentDate.Value.ToString("MMMM d, yyyy") : "&mdash;")</p>
</div>
@if (!string.IsNullOrWhiteSpace(Model.CustomerPO))
{
@@ -350,7 +350,7 @@
</span>
</td>
<td class="text-muted">
@(gcItem.Description.Contains("for ") ? gcItem.Description.Substring(gcItem.Description.IndexOf("for ") + 4).TrimEnd(')') : "&mdash;")
@Html.Raw(gcItem.Description.Contains("for ") ? gcItem.Description.Substring(gcItem.Description.IndexOf("for ") + 4).TrimEnd(')') : "&mdash;")
</td>
<td class="text-end fw-semibold">@gcItem.TotalPrice.ToString("C")</td>
<td>
@@ -396,7 +396,7 @@
<tr>
<td>@p.PaymentDate.ToString("MM/dd/yyyy")</td>
<td>@p.PaymentMethodDisplay</td>
<td>@(p.Reference ?? "&mdash;")</td>
<td>@Html.Raw(p.Reference ?? "&mdash;")</td>
<td>
@if (!string.IsNullOrEmpty(p.DepositAccountName))
{
@@ -407,7 +407,7 @@
<span class="text-muted">&mdash;</span>
}
</td>
<td>@(p.RecordedByName ?? "&mdash;")</td>
<td>@Html.Raw(p.RecordedByName ?? "&mdash;")</td>
<td class="text-end fw-semibold text-success">@p.Amount.ToString("C")</td>
<td class="text-end">
@if (!isVoided)
@@ -463,7 +463,7 @@
<td>@r.RefundDate.ToString("MM/dd/yyyy")</td>
<td>@r.RefundMethodDisplay</td>
<td>@r.Reason</td>
<td>@(r.Reference ?? "&mdash;")</td>
<td>@Html.Raw(r.Reference ?? "&mdash;")</td>
<td><span class="badge bg-@refundStatusColor">@r.Status</span></td>
<td class="text-end fw-semibold text-danger">(@r.Amount.ToString("C"))</td>
<td class="text-nowrap">
@@ -144,7 +144,7 @@
</td>
<td>@inv.InvoiceDate.ToString("MM/dd/yyyy")</td>
<td class="@(inv.IsOverdue ? "fw-bold text-danger" : "")">
@(inv.DueDate.HasValue ? inv.DueDate.Value.ToString("MM/dd/yyyy") : "&mdash;")
@Html.Raw(inv.DueDate.HasValue ? inv.DueDate.Value.ToString("MM/dd/yyyy") : "&mdash;")
</td>
<td class="text-end">@inv.Total.ToString("C")</td>
<td class="text-end @(inv.BalanceDue > 0 ? "fw-semibold" : "text-muted")">
@@ -128,7 +128,7 @@
<td class="text-end">@gross.ToString("C")</td>
<td class="text-end text-muted">@inv.OnlineSurchargeCollected.ToString("C")</td>
<td class="text-end fw-semibold">@net.ToString("C")</td>
<td>@dateDisplay</td>
<td>@Html.Raw(dateDisplay)</td>
<td><span class="badge @statusClass">@inv.OnlinePaymentStatus</span></td>
<td>
@if (!string.IsNullOrEmpty(inv.StripePaymentIntentId))
@@ -206,7 +206,7 @@
}
else
{
@invNum
@Html.Raw(invNum)
}
</td>
<td>@custName</td>