I use the standard HTMLEditorExtender control (part of the ajax toolkit). In the original pageLoad, I fill it with html (including> p <,> br <,> strong <and> img <tags. It displays the HTMLEditorExtender control perfectly. Then, when I do the asynchronous postback (via the updated panel), all> img <tags are displayed as actual html instead of displaying the image. All other tags are still displayed correctly.
The layout of the HTMLEditorExtender control is as follows after the async postback: In the invisible text area used to store the html encoded value, all valid tags are correctly encoded (i.e., <and>), but img tags skip the ampersand before the encoded value (i.e. lt; and gt;).
UPDATE: it works fine if I put this code in my pageLoad event, but I fear what security implications does it have?
if (IsPostBack) { txtBookingConfirmation.Text = Server.HtmlDecode(txtBookingConfirmation.Text); }
Can someone tell me how to prevent control from doing this?
Thanks in advance
source share