However, the HTML is now rendered with very strange spacing (see below). The only solution I could find was to replace the < with < and > with > to avoid the HTML.
The <ul> example you posted doesn’t have a nested <ul> (if it did, it would be the same. <dl> too)
Discourse may have done / be doing some correction of mark-up, but AFAIK, it is often the browser that “fixes” it. Some may add a tag where they think one should be, others may remove tags where they think one should not be, they might ignore tags, etc. Testing pages in multiple browsers can reveal “it looks good in x and y browser, but bad in z browser” problems, but IMHO using the W3C validator https://validator.w3.org/ is one of, if not the best ways to ensure consistency.
I have a html-related issue. My discourse is also a commenting system and imports using an rss feed html.
<div><div>
<p>blabla</p>
</div></div>
<hr>
<small>This is a companion discussion topic for the original entry at <a href="#">url</a></small>
The following code is rendered in the forum as follows. The closing divs are interpreted as code instead of html. Is this not supported anymore by the new markdown engine or is this a bug?
Preview:
blabla
</div></div>
This is a companion discussion topic for the original entry at url
However, it is not safe to assume that no html content pulled in via an RSS feed will never use such a combo. So couldn’t Discourse strip redundant spaces in the html code before posting the content into a topic?
It depends if the RSS feed is HTML or Markdown, we have a component that we use to convert HTML to Markdown for incoming email, it is possible it could be leveraged here optionally. But… I do not think this belongs in this discussion, instead open a new topic with detailed information about the problem and suggested solutions.