I use a kendo template in jsp:
<assd:column has-tooltip="false" width="150px" name="groupName"
template="<span data-link-value='{gId:"#:id#", gName:"#:schoolNameSafe# группа #:groupNameSafe# (#:groupType#)", gType:"#:groupTypeId#", imported:"#:hasLicenses#"}'>#:groupName#</span>"
>Group</assd:column>
And also a JavaScript logic like:
var template = kendo.template(this.rowLinkTemplate);
var fieldData = {};
var dataLinkValue = $("[data-link-value]", arg.currentTarget).attr("data-link-value");
var link = template(eval("(" + dataLinkValue + ")"));
document.location = link;
I have an input string for gName: "CDS "Car Driving School""
The problem is in ampersand in $quot; which is perceived by browser as a delimiter and it turns out that CDS goes to the gName variable, but everything after is considered a key because of the ampersand.
Is it possible to escape the ampersand in $quot;?
Is there any reason you couldn't just use " normally and escape it (rather than encode it)? e.g.
<assd:column has-tooltip="false" width="150px" name="groupName"
template="<span data-link-value='{gId:\"#:id#\", gName:\"#:schoolNameSafe# группа #:groupNameSafe# (#:groupType#)\", gType:\"#:groupTypeId#\", imported:\"#:hasLicenses#\"}'>#:groupName#</span>"
>Group</assd:column>
Disclaimer: I don't know much about kendo so it is entirely possible that there is a reason that this can't be done that I'm unaware of.