I'm having trouble using an SVG image in a column template.
I have my data-column set up to use a column template:
then I have my template script:
I believe xlink:href="#icon-warning2" is causing the problem - if I remove this portion, then the template doesn't error. I've tried escaping the # like this: xlink:href="\\#icon-warning2" but it doesn't work. I know for sure that my SVG reference is working because the graphic shows if I put in anywhere else on the page.
Any insights on how to fix this?
I have my data-column set up to use a column template:
{'field': 'importantNote', 'title': 'Critical', 'template': $('#criticalTemplate').html() }
then I have my template script:
<
script
id
=
"criticalTemplate"
type
=
"text/x-kendo/template"
><
br
> #if(data.importantNote=== 'Y'){#<
br
> <
svg
class
=
"grid-icon"
><
use
xmlns:xlink
=
"http://www.w3.org/1999/xlink"
xlink:href
=
"#icon-warning2"
></
use
></
svg
><
br
> #}else{#<
br
> #}#<
br
></
script
>
I believe xlink:href="#icon-warning2" is causing the problem - if I remove this portion, then the template doesn't error. I've tried escaping the # like this: xlink:href="\\#icon-warning2" but it doesn't work. I know for sure that my SVG reference is working because the graphic shows if I put in anywhere else on the page.
Any insights on how to fix this?