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

Inlined <script>s get removed! #82

Open
Boscop opened this issue Feb 3, 2017 · 0 comments
Open

Inlined <script>s get removed! #82

Boscop opened this issue Feb 3, 2017 · 0 comments

Comments

@Boscop
Copy link

Boscop commented Feb 3, 2017

When I have multiple <script> tags in one line in the html file, the inline script is removed.
E.g.:

<!DOCTYPE html>
<html lang="en">
<head>
  <title></title>
  <meta charset="utf-8" />
  <script>var foo=null;</script><script src="bar.js"></script>
</head>
<body>
</body>
</html>

When I run grunt inline, it turns into:

<!DOCTYPE html>
<html lang="en">
<head>
  <title></title>
  <meta charset="utf-8" />
  <script>
  <!-- contents of bar.js -->
  </script>
</head>
<body>
</body>
</html>

So my own inline script <script>var foo=null;</script> is gone after the inlining!
If I put the inline <script> and the script import in separate lines, it works correctly, but I'm using a html minifier as part of my pipeline, so I would really appreciate if it would also work in the case where everything is in one line!

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