Render specific tag cause infinite loop
Here is the situation I encountered:
Ignore how strange the string is, which is Test Engineer's works, once executed, it will fall into an infinite loop.
Even breakpoint debugging can't work.
So I post here for solution.
const remarkable = new Remarkable('full', {
html: true,
xhtmlOut: false,
breaks: false,
langPrefix: 'language-',
linkify: true,
linkTarget: '_blank',
typographer: false,
quotes: '“”‘’',
});
const html = `
<img src=# onerror=’alert(document.cookie)/><!--‘
<img src=https://dn-coding-net-production-pp.qbox.me/63d4c242-e9c4-4b61-9e61-9adad4bb6b15.png />
`;
remarkable.render(html);
Umm... well - you are feeding remarkable HTML instead of Markdown (edit: originally wrote Markup;), so ... I must say I don't see what you're actually expecting to happen?
Hmm... seems like my knowledge of remarkable is very outdated - apparently it is possible to have HTML as input. I shall see myself out ;)
@DiscoNova We are using Remarkable in our web editor, so we allow users to write markup originally.