Title: Stopping editors adding javascript to posts/pages
Last modified: January 31, 2017

---

# Stopping editors adding javascript to posts/pages

 *  [katmac_aus](https://wordpress.org/support/users/katmac_aus/)
 * (@katmac_aus)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/stopping-editors-adding-javascript-to-postspages/)
 * I have an issue with a site where it keeps getting hacked. I’ve put in various
   security plugins etc but it still getting hacked. One thing I noticed the hackers
   are doing is putting in some javascript at the end of page content. When you 
   log in and view the page in the editor and switch to text view, after a bunch
   of blank lines sits some javascript that just looks like at array of numbers 
   but is obviously malicious and not supposed to be there. So what I want to do
   to strengthen the site it stop anyone being allowed to write javasript in a post/
   page. I can’t find how to do this. Futhermore, if they added some JS via some
   kind of injection/trickery then perhaps auto remove it from post content.

Viewing 1 replies (of 1 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [9 years, 3 months ago](https://wordpress.org/support/topic/stopping-editors-adding-javascript-to-postspages/#post-8718619)
 * Remain calm and carefully follow [this guide](https://codex.wordpress.org/FAQ_My_site_was_hacked).
   When you’re done, you may want to implement some (if not all) of [the recommended security measures](https://codex.wordpress.org/Hardening_WordPress).
 * If you’re unable to clean your site(s) successfully, there are reputable organizations
   that can clean your sites for you. Sucuri and Wordfence are two.

Viewing 1 replies (of 1 total)

The topic ‘Stopping editors adding javascript to posts/pages’ is closed to new replies.

## Tags

 * [hacking](https://wordpress.org/support/topic-tag/hacking/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/stopping-editors-adding-javascript-to-postspages/#post-8718619)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
