1

Closed

PlaceJavascriptAttribute moves scripts it should not

description

The current behavior is to move all <script type="text/javascript"> tags, even those who are enclosed in <script type="text/x-some-template"> tag. This interferes with some client-side templating systems and leads to unexpected results.
Closed Nov 19, 2014 at 4:06 PM by frankabbruzzese
not an issue

comments

frankabbruzzese wrote Oct 5, 2014 at 8:08 AM

Please give more information on your code, since <script> tags cannot be nested! This means you can't nest <script type="text/javascript"> inside a <script type="text/xxxx"> tag. In fact the browser consider simple text the whole content after <script type="text/xxxx">, and renounce to any interpretation, till it finds a </script> closing tag. However the </script> closing tag encountered first is the one that closes the <script type="text/javascript">...so the whole outermost <script...is misinterpreted.
<script type="text/javascript"> can be nested only inside the new html5 <template> tag that at moment is not supported by all browsers and is not supported by the PlaceJavascriptAttribute.

The next version of the toolkit will support also <script type="text/javascript"> inside <template> tags.

Anyway may be I am missing something! So a snippet of code that I can run in my browser, showing your problem is higly appreciated!

wrote Nov 19, 2014 at 4:06 PM