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

114
Vistas
Decode Encoded String

I have a box that looks like this 🟩. I am trying to put it into a string like this

var t = "🟩"

but whenever I try to do that, it automatically gets encoded into something that looks like this 🟩

Here is my code:

<div id="green" style="display: none;">🟩</div>

Should Be

<div id="green" style="display: none;">🟩</div>

How do I decode it? (This code is being uploaded to chrome://extensions if that helps. Thats why its changing I think)

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Add <meta charset="UTF-8"> to the head tag.

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
</head>
<body>
  <div id="green">🟩</div>
</body>
</html>

Also why have you set display to none?

about 4 years ago · Juan Pablo Isaza Denunciar

0

The charset attribute specifies the character encoding for the HTML document.

The HTML5 specification encourages web developers to use the UTF-8 character set, which covers almost all of the characters and symbols in the world!

<!DOCTYPE html>
 <html>

  <head>
   <meta charset="UTF-8">
  </head>

  <body>
    ...       
  </body>

 </html>
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