Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

159
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!