This is a migrated thread and some comments may be shown as answers.

Can you confirm that x-kendo-template is not required?

1 Answer 375 Views
Templates
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 10 Dec 2013, 06:32 PM
I have been annoyed that I don't get any html syntax highlighting in visual studio 2012 within my kendo templates such as:

<script id="my-template" type="text/x-kendo-template">
    <div>.....</div>
 </script>


I found this stackoverflow question that explains you can just use text/html as the type instead of text/x-kendo-template.

This indeed works!

Can you confirm this is a valid workaround and it won't break in the future? Or suggest an alternative?

Thanks

1 Answer, 1 is accepted

Sort by
1
Atanas Korchev
Telerik team
answered on 11 Dec 2013, 07:13 AM
Hello Ryan,

We confirm that the type can be set to anything but text/javascript. Setting the type is required to prevent the browser from executing the contents of the script element.

Regards,
Atanas Korchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Templates
Asked by
Ryan
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or