Please see ticket #1553960 for examples and the initial ticket.
Request: Update isValidXhtml to take in an optional argument that controls whether or not the validation ignores unsupported HTML tags. With the understanding that unsupported tag types do not get output in the HtmlTextBox.
Because the function isValidXhtml evaluates to False for unsupported tag types while the HtmlTextBox just ignores unsupported tag types, there is a disconnect between what the HtmlTextBox can display vs what isValidXhtml allows to be displayed.
This change would allow more flexibility when trying to validate HTML and display it in the HtmlTextBox.
Use case: I have been working a lot with emails and trying to display them within a report. When I use isValidXhtml to validate the email before outputting in an HtmlTextBox, most emails evaluate to False and do not get displayed since they contain many unsupported tag types. However when I remove the validation, more emails get displayed because the HtmlTextBox ignores unsupported tag types. This update would allow more HTML to be considered "valid" by the isValidXhtml function, with the understanding that unsupported tag types will not get displayed.