Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

274
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda