this may be a silly question, but it trips me up every time.
HttpUtility
has the methods HtmlDecode
and UrlDecode
. Do these two methods decode anything (Html/Http related) I might find? When do I have to use them, and which one am I supposed to use?
Just now I hit an error. This is my error log:
Payment receiver was not payment@mysite.com. (it was payment%40mysite.com).
But, I wrapped the email address here in HttpUtility.HtmlDecode
before using it. It turns out I have to use .UrlDecode
instead, but this email address didn't come from a URL so this wasn't obvious to me.
Can someone clarify this?