HTML edits being stripped - Wordpress Solution
[Solved] - HTML edits being stripped - Wordpress Solution
Try following codes
Hi! I'm trying to put code for an image map into the HTML tab in the new post edit page. It's stripped every time. I've disabled all plugins, re-installed 3.0.4, and disabled the visual editor completely. Still the code I put in for this page gets stripped. I've tried it on other pages, and creating a new page, and it's still stripped. I'm tried simply adding to see if it's code in between...and it's still deleted. I've tried the image map code on another blog I run, up to date Wordpress, less history, and it's kept the code without issue. I've changed themes on the blog in question and it's still stripped. I can only assume there's some sort of lingering code effecting the editor or some crazy issue I can't even think of troubleshooting. Please offer suggestions, I'm dying here. The code is stripped but there is blank space in the exact amount of rows, including indentations as the code after I update which just adds to the confusion. I created a video to exemplify. http://screenr.com/C8Y Thank you for anything you can offer. -r -- Robert Granholm http://www.itarsenal.com http://thelifedesignproject.com

Solution - 1

As somebody above alluded to, only administrators (and in some cases editors) can post unfiltered HTML. My guess is that your user table might be corrupted or somewhere along the way your user lost that capability. Try creating a new admin user and doing with that user. This post by Nacin explains it in more details http://wpdevel.wordpress.com/2010/12/31/the-published-exploit-for-wordpress-3-0-4-isnt-accurate/

Solution - 2

Does this happen with the TwentyTen theme?

Solution - 3

can you post the code you want to paste in some pastebin or sth?

Solution - 4

Is your user an Administrator user? Do you have any custom functions in your functions.php? I tried

in TwentyTen theme as an administrator and it worked fine...

Solution - 5

I suggest using http://wordpress.org/extend/plugins/foliopress-wysiwyg/ which is a much better editor and does not strip out code the same way the default one does. then again, if you've disabled the visual editor completely and still have the problem then Im not too sure. Have you tried installing a brand new copy of WP in a temp location with a new database to rule out any database corruption?

Solution - 6

1) add this to custom field (calld it the_content_custom_fiild) 2) at the sigle.php (for blog posts) or page.php after the the_content() function runs type next 3)

Solution - 7

you should also add this to your functions.php so text is saved correctly:

remove_filter('the_content', 'wptexturize');
remove_filter('the_title', 'wptexturize');
remove_filter('single_post_title', 'wptexturize');
remove_filter('category_description', 'wptexturize');
remove_filter('list_cats', 'wptexturize');
remove_filter('comment_author', 'wptexturize');
remove_filter('comment_text', 'wptexturize');
remove_filter('the_rss_content', 'wptexturize');
remove_filter('comment_text', 'wptexturize');
remove_filter('the_excerpt', 'wptexturize');
// remove_filter( 'the_content', 'wpautop' );
// remove_filter( 'the_excerpt', 'wpautop' );
codex ref: http://codex.wordpress.org/Function_Reference/wptexturize I would also look into adding "custom fields" within your pages. Then create if-statements inside your page.php to display/run the code. I've done it, and it works perfectly.

Date: 2022-10-21 05:17:19
Category: Wordpress
More for You