Fossil User Forum

Post sanitization not catching still-open code tags
Login

Post sanitization not catching still-open code tags

Post sanitization not catching still-open code tags

(1) By Warren Young (wyetr) on 2020-05-28 16:44:56 [source]

A recent post left a <code> tag unclosed, affecting the formatting of later posts in the thread. I vaguely recall that a similar fix was made earlier, perhaps for <pre>?

Broadly, any HTML that Markdown allows should be checked and fixed up by the Markdown to HTML processor. I'd guess someone could have a lot of fun with unclosed <table> tags, for example.

It may suffice simply to increment a count any time such an opening tag is found, decrement it when the closing tag is found, and then blindly generate closing tags when the count is > 0 at the end of the document.

(2) By sean (jungleboogie) on 2020-05-28 16:52:03 in reply to 1 [link] [source]

heh, sorry about that and thanks for fixing it.

The formatting did appear quite different throughout the thread and I didn't know why.