Closed allowing closed 7 years ago
I think this is expected behavior. If you write code about HTML, the code should show up exactly as it has been written in the code block. E.g.:
< is an HTML entity.
should show up exactly as above and not as < is an HTML entity
.
There are also tests covering this behaviors, which are failing with your change: https://travis-ci.org/cebe/markdown/jobs/212476763#L230-L234
Thanks for the contribution anyway!
htmlspecialchars() 传递最后一个参数,使已经存在的实体不再二次转义
以上的代码中,
&
符号会再次被转义成&
当传递了最后一个参数为false
时,会把<
看成一个整体,不会仅仅把&
转义。 在此多有得罪了,谢谢您宝贵的时间!