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

156
Views
How to prevent user from putting html and Javascript inside a text user? (tinyMce)

I have a problem with tinyMCE, it seems to store the stuff user create as html, so it can keep the fonts and iamges and stuff, however I have a problem, it seems a user can insert more then just photos and different fonts and symbols, a user can put buttons and event listeners and even javascript inside the text area of the text editor.

they cant simply type it in since it would become text, but if they copy+paste it inside it does not make it text but actual html stuff.

I tried to use escape() but it messes up the tinyMCE output even when the user does not create their own stuff.

How do I fix this and prevent the user from writing their own html stuff and only letting them use the functionality of the text editor(images, fonts, symbols and code, headers and quotes(kinda like stack-overflow))?

Thanks!

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!