WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Trouble with the editor and saving (3 posts)

  1. stopsineman
    Member
    Posted 6 years ago #

    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.

    Example:
    Pre-Save:
    <img class="alignright size-full wp-image-192" style="float: right; margin: 0 5px;" src="http://burningones.com/wp-content/uploads/2008/05/alarmclock.jpg" alt="Bane or Blessing" width="223" height="240" />
    Post-Save:
    <img class="alignright size-full wp-image-192" style="0 5px;" src="http://burningones.com/wp-content/uploads/2008/05/alarmclock.jpg" 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.

  2. stopsineman
    Member
    Posted 6 years ago #

    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.

  3. stopsineman
    Member
    Posted 6 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags