Support » Fixing WordPress » WP 2.0 tag and attribute stripping

  • Here’s my dilemma with WP 2.0;

    When posting an article via XMLRPC (ala Ecto), my tag classes/attributes, and some tags get stripped.

    Code in blog editor:
    <div class="foo"><cite>Bar</cite></div>

    Code after publish:

    But editing a post directly in the WP admin post editor works fine (no stripping). What gives?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Answering my own post for the benefit of others:

    I had to add a couple of arrays (“allowedposttags”) to my wp-includes/kses.php file.

    I added them to the beginning of the array, like this;

    $allowedposttags = array(
    'cite' => array(),
    'div' => array('class' => array(), 'align' => array())

    Completely non-elegant 😉

    mms:// error

    Code in blog editor:
    <a href="mms : // url">text</a>

    Code after publish:
    <a href=" // url">text</a>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP 2.0 tag and attribute stripping’ is closed to new replies.