Setup:
I have attached an event handler on the WebBrowser control something like this…
ChatInputElement.AttachEventHandler("onpropertychange", OnInputChange);
That part works perfect… But the site I’m messing with inputs URLEncoded information into the Input area sometime, which lacks a good human readable experience.
So I was trying to take advantage of the “onpropertychange” event, to fire a method that would URLDecode the data in the input box. Unfortunately this causes a Stack Overflow due to the “onpropertychange” event getting fired when I decode the URL…
Question:
How can I accomplish URLDecoding the data in the input box, without causing a Stack Overflow? Is there a way to detect URLEncoded material, because the input box does contain data that doesn’t need to be decoded at times.
You can set a class-level flag inside your handler, then exit the handler if the flag is set.