My ViewComponent content is getting encoded for some reason, and I have not been able to find a way to render it properly.
In my view:
<vc:my-component></vc:my-component>
My component:
@model List<MyViewModel>
@foreach (var myViewModel in Model)
{
<table class="table table-bordered">
<thead class="thead-default">
<tr>
...
<th>Miércoles</th>
...
</tr>
</thead>
<tbody class="tbody-default">
...
</tbody>
</table>
}
The HTML gets rendered as:
<th>Mi�rcoles</th>
I have tried using this, but didn't make any difference:
<th>@Html.Raw("Miércoles")</th>
How can I make ASP.NET Core render the ViewComponent without encoding it?
EDIT:
The same happens with PartialViews