window.jQuery||document.write('<script src="libs/jquery-2.1.3.min.js"><\/script>'); The backslash is removed from this. Is there a way to prevent this? A stray '); appear as plain text when the site is viewed.