How can I display on the UI sanitized Emojis?

I am trying to sanitize against user input by calling Sanitizer.GetSafeHtmlFragment(input).

This converts my Emoji ????????‍♂️ to something like \U0001f9da�
And while showing back on UI, it is displaying the above text instead of Emoji.
If I don’t use sanitizer then it is displaying Emoji on UI.

Can anyone help me in retaining Emoji’s using GetSafeHtmlFragment function in C#.

Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.