Unicode characters are different from browser source code #897
-
Hey, hope everyone is doing fine. cut.Markup.Should().Contain(_iconDto.Svg.ToBase64()); This is the code I use in my test. public static string ToBase64(this string str)
{
var toEncodeAsBytes = Encoding.UTF8.GetBytes(str);
return Convert.ToBase64String(toEncodeAsBytes);
} This is the method I use to generate the Base64 string. However, my In the browser, it looks like |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
Hey @tobiasbrandstaedter, I can't really reproduce the behaviour, that Blazor unescapes those values: <section style="background-image: url('https://some-image.png')">
@test
</section>
@code {
private const string test = "'Test'";
} Will produce this output: <section style="background-image: url('https://some-image.png')" b-9pdcu9z7mx="">
&#x27;Test&#x27;
</section> Can you show how you are using the component? Cheers |
Beta Was this translation helpful? Give feedback.
-
Hi @tobiasbrandstaedter, thanks for reporting this. I will push a prerelease version of bUnit to nuget.org in 10 minutes or so that you can use to get unblocked. Please report back if this fixes your issues. |
Beta Was this translation helpful? Give feedback.
Hi @tobiasbrandstaedter, thanks for reporting this. I will push a prerelease version of bUnit to nuget.org in 10 minutes or so that you can use to get unblocked. Please report back if this fixes your issues.