Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

294
Views
How to escape the ampersand in "$quote;"

I use a kendo template in jsp:

<assd:column has-tooltip="false" width="150px" name="groupName"
                             template="<span data-link-value='{gId:&quot;#:id#&quot;, gName:&quot;#:schoolNameSafe# группа #:groupNameSafe# (#:groupType#)&quot;, gType:&quot;#:groupTypeId#&quot;, imported:&quot;#:hasLicenses#&quot;}'>#: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;?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!