Title: Trouble with javascript in a post
Last modified: August 18, 2016

---

# Trouble with javascript in a post

 *  [benlong](https://wordpress.org/support/users/benlong/)
 * (@benlong)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/trouble-with-javascript-in-a-post/)
 * I recently upgraded from 1.2 to 2.0 and am having a problem. I’m using a plug-
   in that allows me to include PHP in my posts, and that’s all working fine. I’m
   using the PHP to execute an Include command which inserts an HTML file that places
   a google ad on the page. The inserted HTML file is mostly Javascript, and under
   1.2 this all worked fine.
 * Under 2.0, though, WordPress is inserting a 
    at the end of every line of javascript.
   Is there something I can do to fix this? I have already unchecked “WordPress 
   should correct invalidly nested XHTML” in the Writing Options control panel, 
   but to no avail.
 * Or, is there a better way for me to be doing this?

The topic ‘Trouble with javascript in a post’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [benlong](https://wordpress.org/support/users/benlong/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/trouble-with-javascript-in-a-post/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
