Post Content Filtering and WordPress

One of the wonderful tools in WordPress (and other CMS’s) is their automatic functionality to change your content to make the html results user friendly when saving.

These special codes (including singles quotes, double quotes and ampersands) are handled in the post content filtering you can read about here http://codex.wordpress.org/How_WordPress_Processes_Post_Content.

Unfortunately, this can have negative effects for those inserting special links (like affiliate information) or other links which have embedded parameters

For example: http://www.mywebsite.com?param1=mike&param2=anderle&width=512

&

The post processing can take your “&” character and covert it to & which can be a problem if the page is used for video embedding codes and URL’s.

The page I was working on used these special parameters to set the column width and sent the information back to the video service, which then inserted the HTML back into my page.  Since WordPress would change the code ‘on the fly’ (not inside my database), I didn’t see this issue at first.

Fortunately for me, while debugging another issue, the support person for the video service did notice and brought it to my attention and I tracked down the issue and the fix.

Raw HTML Capability

If you want the ability to remove this automatic functionality from a post or page individually, I suggest adding the plugin Raw HTML Capability by Janis Elsts to your WordPress install.

Once you do this, open up the page or post where you are having the problem, and on the right side you will see this new functionality:

Now, choosing which post processing functionality to disable, on a post-by-post or page-by-page choice is quick and easy.  Once this was done, my page went back to working as I wanted it to.

Hopefully, this helps.  If you have any other ways (for example, the inline method) you want to discuss, please just add a comment below!