dotnet / razor

Compiler and tooling experience for Razor ASP.NET Core apps in Visual Studio, Visual Studio for Mac, and VS Code.
https://asp.net
MIT License
505 stars 196 forks source link

html entities like   are not highlighted in .cshtml Razor files but work fine in regular .html files #6137

Open vsfeedback opened 2 years ago

vsfeedback commented 2 years ago

This issue has been moved from a ticket on Developer Community.


[regression] [worked-in:2019] ! [image.png] (https://aka.ms/dc/image?name=B9e802c4b3c3749cabe18e3f12d8e5d3b637817673934218817_20220301-233632-image.png&tid=9e802c4b3c3749cabe18e3f12d8e5d3b637817673934218817)


Original Comments

Feedback Bot on 3/1/2022, 09:41 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

NTaylorMullen commented 2 years ago

We should look at this from the Razor compiler perspective (aka does it detect them at all). Lets see if it does. If it does not, file an issue on razor-compiler.

ryanbrandenburg commented 2 years ago

It seems the RazorCompiler does not detect this (or at least does not encode it). It gets stored as a MarkupTextLiteral along with any other text floating around near it.

ryanbrandenburg commented 2 years ago

Filed dotnet/razor-tooling#7303 against the dotnet/razor-compiler.

NTaylorMullen commented 2 years ago

Thanks Ryan!