Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How is the method using in a foreach? #4

Open
fdikmen opened this issue May 19, 2021 · 2 comments
Open

How is the method using in a foreach? #4

fdikmen opened this issue May 19, 2021 · 2 comments

Comments

@fdikmen
Copy link

fdikmen commented May 19, 2021

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

@aruntd77
Copy link

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);
}

@fdikmen
Copy link
Author

fdikmen commented Aug 25, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants