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 < and >, to avoid an incorrect tag soup in the result.
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<
and>
, to avoid an incorrect tag soup in the result.