We have an application which takes some plaintext content from various sources and wants to embed that in notes. The content can be user entered or output from other processes and it has its own newlines and important formatting. To give context when the note is viewed in SOAR, we don't just add the content directly from the other process though, our process which adds this content as a note to SOAR will wrap the original content in HTML, adding a bit about when and how the original content was generated, and we use HTML formatting, to, for instance, bold some elements in a sort of "header" we add to the content.
But because of how HTML handles whitespace, all the formatting in the original plaintext content is lost. There is a solution though to this! There is a "pre" tag which tells the browser to preserve formatting.
The pre tag is a safe tag that doesn't represent active content and cannot disrupt the flow control outside its element (can't mess with the page), yet it is filtered from HTML content that is submitted to notes/comments in SOAR. I'm sure you have a list of allowed tags, and this is of course a good idea, but in this case I think you are being more aggressive at removing this than you need to be. Request is to allow this tag and don't filter it out. If it were allowed, we could then wrap the original content in a pre tag and still have the flexibility to add our own formatted context around the content.
See also: The Preformatted Text element - HTML: HyperText Markup Language | MDN
------------------------------
Jon Brunn
------------------------------