Support » Fixing WordPress » Trouble with the editor and saving

  • Resolved stopsineman


    Hello Everyone,

    I began experiencing problems with the upgrade to 2.5 and they have persisted across the move to 2.5.1. Essentially, what has been happening is that style elements in tags get destroyed upon saving.

    <img class="alignright size-full wp-image-192" style="float: right; margin: 0 5px;" src="" alt="Bane or Blessing" width="223" height="240" />
    <img class="alignright size-full wp-image-192" style="0 5px;" src="" alt="Bane or Blessing" width="223" height="240" />

    This is just one example. So far the only occasion I’ve had to observe the behavior is in the styling of pictures. It doesn’t matter where I edit it (in the original addition to the page via the media uploader or later in the editor using the img editor), all styles get destroyed and only a little bit is left, some substring of the original style tag value. It happens either when I save or when I switch views (both from HTML to Visual and vice versa).

    Not really sure what else I can say but if I’ve left something obvious out just ask. Any help would be greatly appreciated.

    Timmy V.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve been told by someone on the irc channel that this is an issue with kses.

    Two questions:

    1. kses says that the style attribute is allowable within an img tag, if it is, why is kses messing with it.

    2. Why has this functionality changed since my upgrade from 2.5 to 2.5.1, since kses has been in WP since 2.0?

    Any help would be greatly appreciated! 🙂

    Timmy V.

    I just disabled kses and did some editing with WP and all of the tags and values were maintained correctly accross saves and previews etc.

    I have since reenabled it because I’m not interested in getting hacked, but the question I have now is, what could have gone wrong with kses and how can I fix it?

    If someone could please help me out, it would really be great. It’s a fairly simple question, I think.

    All else fails, I guess I could reinstall WP…

    Thanks in advance!

    Timmy V.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trouble with the editor and saving’ is closed to new replies.