Fix — HTML entity rendering across 60 views
Razor's @() expression auto-encodes &, turning — into &mdash; 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:
@@ -256,7 +256,7 @@
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<span class="text-muted">Expected Delivery</span>
|
||||
<span class="@(Model.IsOverdue ? "text-danger fw-semibold" : "")">
|
||||
@(Model.ExpectedDeliveryDate?.ToString("MM/dd/yyyy") ?? "—")
|
||||
@Html.Raw(Model.ExpectedDeliveryDate?.ToString("MM/dd/yyyy") ?? "—")
|
||||
</span>
|
||||
</div>
|
||||
@if (Model.ReceivedDate.HasValue)
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
</span>
|
||||
</td>
|
||||
<td>@po.OrderDate.ToString("MM/dd/yyyy")</td>
|
||||
<td>@(po.ExpectedDeliveryDate?.ToString("MM/dd/yyyy") ?? "—")</td>
|
||||
<td>@Html.Raw(po.ExpectedDeliveryDate?.ToString("MM/dd/yyyy") ?? "—")</td>
|
||||
<td class="text-center">@po.ItemCount</td>
|
||||
<td class="text-end fw-semibold">$@po.TotalAmount.ToString("N2")</td>
|
||||
<td class="text-end">
|
||||
|
||||
Reference in New Issue
Block a user