The MU forums have moved to WordPress.org

wpmu stripping / appending html code? (4 posts)

  1. awacht
    Member
    Posted 16 years ago #

    I am transferring some blogs from my older single WP install into my newer WPMU install. I've got an issue with WPMU apparently stripping/altering some html within one of my blog's posts. The single WP install had no problem, so I'm curious what gives with WPMU. The main problem, is that I have a table in a post that is supposed to use white text against a black background. When imported to WPMU, the code is changed and elements are stripped out, leaving my text black on a black background. Here is the particular html code:

    <th valign="middle" align="center" scope="col"><span style="color: #ffffff"><em style="font-weight: normal">blah blah blah, this sample text should be white</span></th>

    and here is what WPMU does to that:

    <th scope="col" align="center" valign="middle"><span>blah blah blah, this sample text should be white</span></th>

    Anyone know how to approach this?
    Thanks

  2. drmike
    Member
    Posted 16 years ago #

    The dfference is WPMu is designed to allow folks that you don't know to create their own blogs. It's a security matter as you will have folks trying to hack your site. Inline styles are stripped due to those security concerns. IIRC, that's how the MySpace worm was able to gain access.

    I would take a look at teh wp-includes/kses.php file as that's where the allowed html is listed. The first portion is for content like Posts, the second array is more secure and is for stuff like comments. You may want to compare it with the kses.php file from regular wordpress.

    hope this helps,
    -drmike

  3. ZorkFox
    Member
    Posted 16 years ago #

    I personally dislike this stripping of inline styles, and I see "security reasons" cited all over the place. What are these security reasons? LiveJournal strips inline style from user profiles (and a few small things like comment titles), but not from post or comment bodies. Where can I learn more about these elusive "security reasons"?

  4. ZorkFox
    Member
    Posted 16 years ago #

    Ah. Here we go. How interesting that "plain text" can do so much weirdness.
    http://ha.ckers.org/blog/20060817/variable-width-encoding/

About this Topic