Well, this is a bit weird and my not sure why is that, but {} will produce <script></script>, while without {} it would have been <script />. And <script /> doesn't work : http://stackoverflow.com/questions/69913/why-dont-self-closing-script-tags-work