3 ms·
You could also in theory just restrict which HTML elements can be used. You’d need to do that anyway for MD, especially since MD can contain HTML itself. I’m a
by lobsterthief 3y ago
You could also in theory just restrict which HTML elements can be used. You’d need to do that anyway for MD, especially since MD can contain HTML itself.
I’m a huge fan of MD either way ;) I’ve built entire large sites where raw content is stored in MD (along with a MD WYSIWYG) and then the MD is converted to HTML. I’ve found it’s easier and more reliable to parse MD vs HTML, unless of course you’re using a block editor or something more structured.
- layer8 3y ago> You could also in theory just restrict which HTML elements can be used. That’s not enough, because you also have to restrict what attributes they may carry (inline styles, event handlers), the type of meta tags and image formats, and so on. But in any case, such a restricted subset was what I was already presuming in my comment.
- PaulDavisThe1st 3y agoYou don't have to restrict them at all. You just ignore them.
- layer8 3y agoThat's what is meant by restricting.