September 3, 2010

Solving WordPress 2.0 External Posting Errors

Since upgrading to WP2.0 I had not been able to use my favorite Weblog editor Ecto to do any posts which contained any inline tags, such as div or span classes. Also, it had been stripping the meat of Image tags. This was playing hell with my Technorati tags and, well, with how I like to blog.

Looking at the Ecto console, I saw that it was actually WP which was refusing to take the tags. With that bit of information, I rapidly zeroed in on the problem.

Solution

Edit your wp-includes/kses.php file, add the tag attributes you want.

I changed or added the following:
'div' => array ('align' => array (), 'class' => array (), 'id' => array(), 'style' => array()),
'span' => array ('class' => array (), 'id' => array(), 'style' => array()),
'p' => array ('align' => array (), 'class' => array (), 'id' => array(), 'style' => array()),
'tag' => array(), 'tags' => array(),

You can download the kses.php file with my fixes, if you like.

Now, everything but the img uploads is working as it should. I’ll figure that out and post the solution soon.

Update: 15 minutes later

To make images work, simply make sure you close the tag, and put a space after the src.

Bad:
<img src=”http://example.com/test.jpg”>
<img src=”http://example.com/test.jpg”/>

Good:
<img src=”http://example.com/test.jpg” />

Thanks go to Doncha for the img tag tip.

Technorati Tags: ,

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Related posts:

  1. WordPress 2 multi-blogging made easy I upgraded the site to Wordpress 2 this morning. This...

About Bruce Kroeze

Comments

Trackbacks

  1. [...] Read more about Bruce’s solution here if you’re suffering through the same problem. [...]

  2. [...] Solving WordPress 2.0 External Posting Errors – Coder?s Eye (Tags: wordpress) [...]

  3. [...] Solving WordPress 2.0 External Posting Errors – Coder?s Eye (Tags: wordpress) {mark_desc} [...]