Raw HTML Plugin for WordPress
Introduction
Recently I needed to put some style definitions and a JavaScript function in a post on another blog that I have. I wasted several hours trying to do this, because WordPress insisted on putting backslashes in front of my apostrophes, inserting superfluous <p> or <br /> tags in place of newlines, and generally breaking my HTML in various horrible ways.
In the end I decided to just go and write a plugin that would let me disable the automatic formatting that WordPress applies to post content. This plugin adds a set of shortcodes that you can use to “protect” specific parts of your post and prevent WP from messing with them.
Download & Installation
Requirements :
- WordPress 2.8 or later
- If you use the free version, I strongly recommend disabling the visual editor. It (the editor) can mess up your code even if you use this plugin.
Installation is straightforward – download the zip file, unzip, upload the raw-html folder to /wp-content/plugins and activate it in the Plugins tab.
Usage
There are two ways to use the plugin. First, to turn off “smart quotes” and other built-in filters for an entire post, use the checkboxes that Raw HTML adds to the “Edit Post” screen:

If you want to prevent a specific part of your post or page from being processed and “texturized” by WordPress, wrap it in [raw]…[/raw] or <!–raw–>…<!–/raw–> tags. The two versions work exactly the same, with one exception – the <!–raw–>’s won’t be visible to your visitors even if you deactivate the plugin.
Example :
<!--raw-->
This
is
a 'test'!
<!--/raw-->
Result :
This
is
a 'test'!
If you view the source code of this page, you will see that the newlines are still there, and the apostrophes haven’t been converted/escaped.
Other Notes
This plugin is provided AS IS, with no guarantee that it will work on your site.
Related posts :
Hey Dude,
Thanks for your plugin. But the 1.4.3 update introduced a problem on my site; it causes a large space to be left under buttons created by Really Simple Facebook Twitter Share Buttons. It looks like a spurious [br /] is being inserted into the button code or something. Version 1.4.2 works fine.
Cheers,
Graham
Looks like a problem with filter priorities. I’ve patched it in the development version, give it a try.
Hi, I just use your plugin in one of my client wordpress website, she having problem with form validation javascript. this just save a lot of my time. many thanks for the Raw HTML plugin.
qammar feroz
I would love to buy the pro version of your plugin for RAW html. However, I pretty much refuse to deal with paypal accounts after they ripped me off for $7000. I don’t mind using a credit card through paypal, but your cart requires the creation of a paypal account, which it does not have to do. Any alternative ways I can pay you?
Thanks
Rich Dutton
Gracias!!!! Gracias!!!!!! me has salvado la vida con este plugin!!!!!!!