Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML with multiple <noscript> is destroied #150

Open
jkr2255 opened this issue Jan 31, 2017 · 0 comments
Open

HTML with multiple <noscript> is destroied #150

jkr2255 opened this issue Jan 31, 2017 · 0 comments

Comments

@jkr2255
Copy link

jkr2255 commented Jan 31, 2017

Recently I've got a white page with InstantClick. Investigating how this occurred, I have found one problem.

  function removeNoscriptTags(html) {
    /* Must be done on text, not on a node's innerHTML, otherwise strange
     * things happen with implicitly closed elements (see the Noscript test).
     */
    return html.replace(/<noscript[\s\S]+<\/noscript>/gi, '')
  }

this regex hits from first <noscript through last </noscript>, so contents between two <noscript>...</noscript>s are also blown away.

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

No branches or pull requests

1 participant