realaravinth / libmedium

An Alternative Medium Frontend | Development continues at: https://git.batsense.net/realaravinth/libmedium
https://libmedium.batsense.net
GNU Affero General Public License v3.0
74 stars 7 forks source link

Improperly parsing HTML #31

Open tlindsay opened 7 months ago

tlindsay commented 7 months ago

In the first paragraph of this article, the author includes a small <code> block:

<code class="cw np nq nr ns b"><marquee></code>

When rendering this article via libmedium, the parser doesn't realize that the <marquee> is supposed to be the text-literal contents of the <code> block, and instead treats it as an unclosed part of the document. This causes the rest of the article to render inside of the <code><marquee>... which is... not ideal for readability 😆

Screen Shot 2024-01-23 at 16 35 00