.NET MAUI how to render HTML in Label
Description
.NET MAUI To render HTML content in a Label on iOS and Android, I am using the TextType="Html" attribute on the Label element. However, iOS does not render any HTML, while Android only supports bold text. Any ideas on how to fix this issue?"
<Label Text="{Binding texto}"
Style="{StaticResource CommonTextStyle}"
x:Name="LabelText"
FontSize="17"
TextType="Html"/>
I want the TextType="Html" to recognize the HTML tags in my text and display them on the screen.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
9.0.0-rc.1.24453.9
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
We've found some similar issues:
- #21044 , similarity score: 81%
- #4230 , similarity score: 81%
If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.
Note: You can give me feedback by 👍 or 👎 this comment.
I can repro this issue at Android & iOS platform on the latest 17.12.0 Preview 2.1(9.0.0-rc.2.24503.2 & 9.0.0-rc.1.24453.9).
Can you please create a repro project that shows the HTML you're trying to render?
basic UL and OL won't render in NET 9 RC - NET 8 worked fine.
basic UL and OL won't render in NET 9 RC - NET 8 worked fine.
Could you attach a small sample where reproduce the issue?
Hi @SaraIsabelleLima. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.