ToastNotification icon indicating copy to clipboard operation
ToastNotification copied to clipboard

How is the method using in a foreach?

Open fdikmen opened this issue 3 years ago • 2 comments

If the method is in a foreach, it doesn't work. image

fdikmen avatar May 19 '21 00:05 fdikmen

I am unsure if you were able to fix. I also had the same issue. But I ended up encoding the Html. I saw that in my case the single quotes were returned which is not handled in the library. So used below code which is working for me

var errormessage = ""; var htmlEncoder = HtmlEncoder.Create(new TextEncoderSettings());

foreach (var error in result.Errors) { errormessage = htmlEncoder.Encode(error.Description); _notify.Error(errormessage); }

aruntd77 avatar Aug 14 '23 08:08 aruntd77

The code I gave works for me. If you get an error, write and I will help you.

fdikmen avatar Aug 25 '23 18:08 fdikmen