razor icon indicating copy to clipboard operation
razor copied to clipboard

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

Open vsfeedback opened this issue 3 years ago • 4 comments

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)

vsfeedback avatar Mar 03 '22 22:03 vsfeedback

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.

NTaylorMullen avatar Mar 10 '22 22:03 NTaylorMullen

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 avatar Mar 15 '22 23:03 ryanbrandenburg

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

ryanbrandenburg avatar Mar 15 '22 23:03 ryanbrandenburg

Thanks Ryan!

NTaylorMullen avatar Mar 16 '22 02:03 NTaylorMullen