<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: fixing wordpress &#8212; editor removing div tags</title>
	<atom:link href="http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags</link>
	<description></description>
	<pubDate>Tue, 06 Jan 2009 06:51:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: coolnalu</title>
		<link>http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/comment-page-1#comment-2112</link>
		<dc:creator>coolnalu</dc:creator>
		<pubDate>Sun, 28 Sep 2008 21:15:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/#comment-2112</guid>
		<description>uh...html tags were removed...</description>
		<content:encoded><![CDATA[<p>uh&#8230;html tags were removed&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: coolnalu</title>
		<link>http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/comment-page-1#comment-2111</link>
		<dc:creator>coolnalu</dc:creator>
		<pubDate>Sun, 28 Sep 2008 21:13:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/#comment-2111</guid>
		<description>I am using 2.6.2. And what I am trying to do is stop it from removing my precious p tags. under wp-admin/js/editor.js,

I commented off two lines and replaced it with a new one
        
//content = content.replace(new RegExp('\\s*', 'mgi'), '');
        
//content = content.replace(new RegExp('\\s*\\s*', 'mgi'), '\n\n');
		
content = content.replace(new RegExp('\\s*\\s*\\s*', 'mgi'), '\n');

it now only removes  tags with empty content. i hope. seems working for me. hope it helps someone.</description>
		<content:encoded><![CDATA[<p>I am using 2.6.2. And what I am trying to do is stop it from removing my precious p tags. under wp-admin/js/editor.js,</p>
<p>I commented off two lines and replaced it with a new one</p>
<p>//content = content.replace(new RegExp(&#8217;\\s*&#8217;, &#8216;mgi&#8217;), &#8221;);</p>
<p>//content = content.replace(new RegExp(&#8217;\\s*\\s*&#8217;, &#8216;mgi&#8217;), &#8216;\n\n&#8217;);</p>
<p>content = content.replace(new RegExp(&#8217;\\s*\\s*\\s*&#8217;, &#8216;mgi&#8217;), &#8216;\n&#8217;);</p>
<p>it now only removes  tags with empty content. i hope. seems working for me. hope it helps someone.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Moore! &#187; Solution for Wordpress turning div tags to p tags</title>
		<link>http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/comment-page-1#comment-2109</link>
		<dc:creator>Dan Moore! &#187; Solution for Wordpress turning div tags to p tags</dc:creator>
		<pubDate>Fri, 26 Sep 2008 03:38:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/#comment-2109</guid>
		<description>[...] your lucky day, if you&#8217;re using WP 2.3.  Edit the tiny_mce_config.php as outlined at this article and [...]</description>
		<content:encoded><![CDATA[<p>[...] your lucky day, if you&#8217;re using WP 2.3.  Edit the tiny_mce_config.php as outlined at this article and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/comment-page-1#comment-2108</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 26 Sep 2008 03:33:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/#comment-2108</guid>
		<description>Mario's solution (#6) worked for me.  I'm on WP 2.3.3.

Thanks!</description>
		<content:encoded><![CDATA[<p>Mario&#8217;s solution (#6) worked for me.  I&#8217;m on WP 2.3.3.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/comment-page-1#comment-2049</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Tue, 26 Aug 2008 20:22:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/#comment-2049</guid>
		<description>Does anyone have a solution for WP 2.5 and up? This worked great for version before that but I can't seem to find that code anywhere in the tiny_mce_config.php file. Did div code move?</description>
		<content:encoded><![CDATA[<p>Does anyone have a solution for WP 2.5 and up? This worked great for version before that but I can&#8217;t seem to find that code anywhere in the tiny_mce_config.php file. Did div code move?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/comment-page-1#comment-1900</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 19 Mar 2008 16:46:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/#comment-1900</guid>
		<description>Just delete the p/-div[*] from the list then the  will not be replaced by the  tag. Worked here!</description>
		<content:encoded><![CDATA[<p>Just delete the p/-div[*] from the list then the  will not be replaced by the  tag. Worked here!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: j.daniel rivera</title>
		<link>http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/comment-page-1#comment-1894</link>
		<dc:creator>j.daniel rivera</dc:creator>
		<pubDate>Wed, 19 Mar 2008 03:52:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/#comment-1894</guid>
		<description>ok ppl, i found the solution.  Where it mentions "p/-div[*]", replace it with this "div/-div".  It work out for me.</description>
		<content:encoded><![CDATA[<p>ok ppl, i found the solution.  Where it mentions &#8220;p/-div[*]&#8220;, replace it with this &#8220;div/-div&#8221;.  It work out for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evan</title>
		<link>http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/comment-page-1#comment-1870</link>
		<dc:creator>Evan</dc:creator>
		<pubDate>Sat, 15 Mar 2008 16:28:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/#comment-1870</guid>
		<description>Thanks everyone, this topic is obscure but highly important!

@Mario - I tried your fix since it makes sense however it didn't work for me either; good try though mate

@Simon - A brilliant (if not draconian) solution! I've done it an it works well!</description>
		<content:encoded><![CDATA[<p>Thanks everyone, this topic is obscure but highly important!</p>
<p>@Mario - I tried your fix since it makes sense however it didn&#8217;t work for me either; good try though mate</p>
<p>@Simon - A brilliant (if not draconian) solution! I&#8217;ve done it an it works well!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/comment-page-1#comment-1596</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Sat, 19 Jan 2008 21:31:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/#comment-1596</guid>
		<description>Mario,

That didn't work for me but if you just delete the tinymce folder from wordpress nothing breaks and you just get given the code option.

It appears that it isn't wordpress that changes the tags it is the WYSIWYG text editor, that's why posts can be fine first save and then screwed when you go back to edit and it opens via tinymce first.

Oh and don;t forget to clear your cache once it's changed</description>
		<content:encoded><![CDATA[<p>Mario,</p>
<p>That didn&#8217;t work for me but if you just delete the tinymce folder from wordpress nothing breaks and you just get given the code option.</p>
<p>It appears that it isn&#8217;t wordpress that changes the tags it is the WYSIWYG text editor, that&#8217;s why posts can be fine first save and then screwed when you go back to edit and it opens via tinymce first.</p>
<p>Oh and don;t forget to clear your cache once it&#8217;s changed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario</title>
		<link>http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/comment-page-1#comment-1590</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Thu, 17 Jan 2008 18:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mcstudios.net/2007/03/19/fixing-wordpress-editor-removing-div-tags/#comment-1590</guid>
		<description>Hey, I found a solution. Alter the tiny_mce_config.php file as follows.

change

    'p/-div[*]

to

    'p[*],-div[*]

'-' means remove empty elements
'p/div' means replace div by p
'[*]' means any attribute allowed 


Credit: http://wordpress.org/support/topic/139510#post-658765</description>
		<content:encoded><![CDATA[<p>Hey, I found a solution. Alter the tiny_mce_config.php file as follows.</p>
<p>change</p>
<p>    &#8216;p/-div[*]</p>
<p>to</p>
<p>    &#8216;p[*],-div[*]</p>
<p>&#8216;-&#8217; means remove empty elements<br />
&#8216;p/div&#8217; means replace div by p<br />
&#8216;[*]&#8216; means any attribute allowed </p>
<p>Credit: <a href="http://wordpress.org/support/topic/139510#post-658765" rel="nofollow">http://wordpress.org/support/topic/139510#post-658765</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
