gruntjs / grunt-contrib-connect

Start a static web server.
http://gruntjs.com
MIT License
714 stars 146 forks source link

Livereload.js snippet inject wrong place #101

Closed kymmt closed 10 years ago

kymmt commented 10 years ago

If JavaScript has </body> as string like this

<script>
var s = '</body>'
</script>
</body>
</html>

livereload.js is inserted to first match of </body>

<script>
    var s = '
<script type="text/javascript">document.write('<script src="' + (location.protocol || 'http:') + '//' + (location.hostname || 'localhost') + ':35729/livereload.js?snipver=1" type="text/javascript"><\/script>')</script>
</body>';
</script>
</body>
</html>

this plobrem is already fixed in connect-livereload v0.4.0

Can you update connect-liverelload to v0.4.0?

klamping commented 10 years ago

I believe #108 fixes this issue.