I have reported this possible bug via the Visual Studio feedback tool but I have the following example code that runs in .Net 5 but doesn't work correctly in .Net 6 and I feel like this is either a bug or I'm missing something that changed between versions. I have the example code below along with the html output using the Visual Studio html visualizer from both methods. Does anyone have any possible input on this issue?
UPDATE: From different testing thanks to helpful suggestions from @GSerg I have found that this bug only happens in .Net 6 when you use html tags inside of a string interpolation or a stringbuilder and it chops off the text before the inserted variable and inserts it on the second line. I have attached a new screenshot showing this behavior using the visual studio visualizer.
var subect = "Subect Example";
var test = $"<p><strong><span style=\"font-size: 20px;\">{subject}</span></strong></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; " +
$"font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; " +
$"text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; " +
$"text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">The following information is in beta testing and isn't meant for a live portfolio. " +
$"Use this information for paper trading only until further notice.</span></p>";


