JimmyBorofan
JimmyBorofan

Reputation: 157

Prevent Wordpress auto formatting page HTML

I am trying to add a script to a page in Wordpress,

Now I will be the first to admit when it comes to CMS' Drupal is my forte not, WP.

The problem have is that I am tring to add a script to the page content and when I save, WP add spaces which breaks the script:

the original section of code looks like this:

 [... other code that is not affected---]

 o = (n & 3) << 4 | r >> 4;
 u = (r & 15) << 2 | i >> 6;

 [... other code that is not affected---]

but as soon as I click 'Update' it reformats the code to this:

 [... other code that is not affected---]

 o = (n & 3) < < 4 | r >> 4;
 u = (r & 15) < < 2 | i >> 6;

 [... other code that is not affected---]

As you can see it adds a space between the two less than characters, which breaks the code,

Is there a way of turning off the automatic formatting to prevent this?

Any help is always appreciated

Jim

Upvotes: 0

Views: 185

Answers (1)

Crack_David
Crack_David

Reputation: 2843

For using JScript in WP-Posts, you have to include them into external js-Files.

Referring to: http://codex.wordpress.org/Using_Javascript

Upvotes: 2

Related Questions