Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

116
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda