marked icon indicating copy to clipboard operation
marked copied to clipboard

输入iframe时会被执行,是设计如此还是问题呢

Open CHENFANGC opened this issue 1 year ago • 1 comments

Marked version: all Describe the bug A clear and concise description of what the bug is. demo https://marked.js.org/demo/?text=%3Ciframe%20src%3D%22javascript%3Aalert(%27Your%20user%20token%20is%3A%20%27%2BlocalStorage.getItem(%27userToken%27)%2B%27%20Cookies%3A%20%27%2Bdocument.cookie)%22%3ETrust%20No%20AI%3C%2Fiframe%3E&options=%7B%0A%20%22async%22%3A%20false%2C%0A%20%22breaks%22%3A%20false%2C%0A%20%22extensions%22%3A%20null%2C%0A%20%22gfm%22%3A%20true%2C%0A%20%22hooks%22%3A%20null%2C%0A%20%22pedantic%22%3A%20false%2C%0A%20%22silent%22%3A%20false%2C%0A%20%22tokenizer%22%3A%20null%2C%0A%20%22walkTokens%22%3A%20null%0A%7D&version=15.0.4

输入以下内容

输出结果是iframe被执行,期望结果是不被执行,以代码块儿形式展示

image

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

CHENFANGC avatar Dec 23 '24 09:12 CHENFANGC

This is expected, html is left alone according to the CommonMark spec

UziTech avatar Dec 23 '24 15:12 UziTech