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

164
Visualizações
How can I store a block of text with links in my DB?

I have a textarea (as a description), I want to store the HTML code of the textarea in my db and I can convert the text to HTML with the "br" and "a" tags, the only ones I need. My problem is with the links that have &.

With JS, I tried to use btoa() method to encode the string, store it in my DB and decode with atob() when I want to show it but it gives me this error: Uncaught DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I resolved the problem with a string replace before inserting it in the table, and where I want to show, replace it again by &.

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