Some widely used programs, which generate html, will only generate opening paragraph tags, and not closing ones, assuming that the browser will properly close paragraphs.
On the face of it, it seems to me that the assumption that browsers will properly close paragraphs is not correct. Is my interpretation correct? More generally, what tradeoffs are involved in this kind of decision?
Browsing through moinmoin source code, the following line of code caught my eye:
# We only open those tags and let the browser auto-close them: _auto_closing_tags = set(['p'])
After reading throug the rest of the implementation, I've convinced myself that yes, indeed, when moinmoin generates html code for one of its pages, it will correctly generate paragraph open tags, where appropriate, while at the same time purposefully avoiding any of the paragraph close tags (despite being able to trivially do so).
For my specific, rather unusual, use case, this behaviour is not correct. I'm tempted to submit a bug report and/or change the behaviour. However, it looks like this design decision was thoughtfully made. I'm not well enough versed in the intricacies of the html standard, or the various browser implementations, to be able to tell if this is correct behaviour in general, and I have the feeling that my instinct to correct/change this behaviour might be misguided.
Is this code making a valid assumption about browser implementations? Is the generated html valid? More generally, what tradeoffs might I be missing here?