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

133
Views
Is the HTML output of quill.root.innerHTML always safe?

I want to save and load the rich text from a Quill editor. My plan is to call JSON.stringify(quill.getContents()) and save the resulting JSON. Then to load and display the rich text I would do:

quill.setContents(JSON.parse(myJson));
myDiv.innerHTML = quill.root.innerHTML;

My question: is it the case that regardless of the contents of the myJson string, the above will only render the standard HTML tags which Quill supports? i.e. is it impossible to pick the myJson string in a way that the resulting HTML does something which couldn't have been accomplished by using the Quill editor UI in the intended way?

For example - if I have configured Quill to not allow images, I wouldn't want it to be possible to create a JSON string which would result in the above code rendering an image.

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