Sometimes when I copy javascript from jsfiddle into Dreamweaver I end up banging my head in the wall. Two documents with (what looks to be) the EXACT same javascript doesn’t work in the same way.
In document A I have the following code:
<script>
alert('test')
</script>
In document B I have the following code (does not work):
<script>
alert('test')
</script>
Note: Please copy code B in to a html document and try if it alert before giving me comments. I am not joking, there is something weird going on.
I have located the problem to be something with the end script tag, but I can’t see any thing wrong with the code.
Whats the difference in the code from document A and B?
You’ve got an Zero-width space (U+8203) behind the closing bracket.
The bug is known to jsfiddle, it seems to be an issue with the codemirror syntax highlighter.