GeraldWodni / forth-standard.org

Official website of the Forth 2012 Standard, and the Forth200x committee.
9 stars 3 forks source link

FIX site.js -- allow correct tags in Markdown #51

Closed ruv closed 11 months ago

ruv commented 11 months ago

The marked module (which converts Markdown into HTML) does not escape <, if it looks like the start of an HTML tag. So, a wrong tag soup can appear in the result.

In the same time, correct HTML tags were used sometimes, e.g. <ins> ... </ins>.

To distinguish correct tags from other use of <, the new regexp does lookahead assertion for the closing tag.

If < and > are used not for a correct tag, they are just escaped via &lt; and &gt;, to avoid an incorrect tag soup in the result.

GeraldWodni commented 11 months ago

I really don't want to allow general HTML. I explictly allowed <ins> and <del>, and checking some of your contributions, I also allowed <u> and <i>