Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

IFRAME is not handled as atomic token #308

Open
radubarbos opened this issue May 15, 2018 · 0 comments
Open

IFRAME is not handled as atomic token #308

radubarbos opened this issue May 15, 2018 · 0 comments

Comments

@radubarbos
Copy link

If the IFRAME is splitted in 2 writes like:
document.write('<IFRAME SRC="...">');
document.write('</IFRAME>');
then it's not treated as an atomic token but the first write as start tag which is not fine.
An side effect is that the 'done' write function is not executed and the active stream is not reset.

The solution I found working is adding the iframe check to the peekTokenImpl function
like:
if (token.type === 'startTag' && /script|style|iframe/i.test(token.tagName)) {
return null;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant