Can someone explain to me the design tradeoff that was made to always HTMLEncode text from the DNN text editor control (DotNetNuke.UI.UserControls.TextEditor)?
It seems odd to me because the primary use of the control that I've seen is to host the HTML Editor provider for Rich Text. When a user has entered Rich Text (wth Html formatting that needs to be preserved) there is no need for HtmlEncoding. It appears to me that DNN is simply:
- On Edit: Html Encoding strings and storing Html Encoded strings in the database
- On View: Decoding the strings for presentation as un-encoded HTML.
So, it seems that we haven't really gained anything. All we've done is added an extra step every time we want to process a string (like in GetSearchItems).
Perhaps this makes more sense if the TextEditor is limited to Basic Textbox and Text mode. Is that the case?
Is there an advantage to having HtmlEncoded strings in my database that I'm missing?