Archive for February 21st, 2007

wordpress-mu strips any unknown html entity

Wednesday, February 21st, 2007

After migrating from wordpress 2.1 to wordpress-mu 1.0 I was not able to write source code like XML inside <code> tags. I searched the web and tried some plugins - to no avail :(

Finally I decided to go the brute force way by editing wp-includes/kses.php and removing the whole code. Therefor I changed the wp_kses method to:

function wp_kses($string, $allowed_html, $allowed_protocols = array (‘http’, ‘https’, ‘ftp’, ‘news’, ‘nntp’, ‘telnet’, ‘feed’, ‘gopher’, ‘mailto’))

    # Don’t do anything
    # just return the string untouched
    return $string;
}

It is really ugly though…