I have angle bracket HTML entities in a Blazor client-side app page ...
<h1 style="font-style:@@_headingFontStyle">@@_headingText</h1>
... it would render that content out with the encoded angle brackets. The browser would render that as text ...
<h1 style="font-style:@_headingFontStyle">@_headingText</h1>
I just did an 0.4.0 -> 0.5.0 update. It's apparently decoding those < and > into actual angle brackets. The browser is now rendering that content as HTML.
Confirmed, just found the same thing when I upgraded my project BlazorChatSample to 0.5.0.
Source: https://github.com/conficient/BlazorChatSample/blob/master/BlazorChatSample.Client/Pages/Index.cshtml this has <code>invokeAsync<object></code> to invoke.. in the HTML but on the browser is rendered as
<code>invokeAsync<object> to invoke .... <p></p>
See https://blazorchatsample.azurewebsites.net/ for example
<h1 style="font-style:@@_headingFontStyle">@@_headingText</h1>
<h1 style="font-style:@@_headingFontStyle">@@_headingText</h1>
... lead to the same result.
@danroth27 @SteveSandersonMS I can update the "Build your first" experience sample app (it doesn't use HTML entities), but I can't easily update the doc's "Common" sample app to 0.5.0 until this is resolved or I go with images as a workaround. The content explains what the sample code is doing, and I don't want to lose that presentation. If this will take a while to fix, then what I'll probably do is screenshot the 0.4.0 app's output and use images in the sample. Since that's a time-consuming workaround, I'll wait until I hear back from you on this before I proceed.
Thanks for the report! And sorry for the inconvenience.
The earliest we could feasibly fix this would be in a 0.5.1 update possibly next week but more likely the week after.
@SteveSandersonMS Thanks --- I think the best I can do today is just screenshot the markup I want to show and load some images into the pages. I could just kill the content temporarily, but I feel that showing the markup is an important educational component of the sample. I'll open a docs issue and keep an :eye: out for 0.5.1.
@guardrex following workaround works:
@((MarkupString)"<code>invokeAsync<object></code> to invoke..")
@Suchiman Perfect! Thank you. I'll do that until the patch lands.
Fixed with 8c452ff71ad1c59af0115747794a313d91ace789
We'll apply a more long-term fix when we reintroduce the markup optimization later.
Most helpful comment
@guardrex following workaround works:
@((MarkupString)"<code>invokeAsync<object></code> to invoke..")