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

209
Vistas
How to ignore html tags/code stored in JavaScript variables?

Hi I am currently working on a django project wherein I send multiple plotly charts as html code to the client side and try to store this html code in a dictionary I first make the chart and convert to HTML code

prediction_graph = prediction_graph.to_html(full_html=False)

then I send multiple such charts to client side. Here please note that charts itself is a dictionary.

return render(request, 'charts.html', {
                "tickerList": charts["tickerList"],
                "charts": json.dumps(charts)})

On client side I try to store it in a javascript variable

charts = {{ charts|safe }};

However the html tags/code present in this variable causes error. enter image description here

enter image description here

Is there any way to solve this? like make it ignore the html tags/code

about 4 years ago · Juan Pablo Isaza
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