The MU forums have moved to WordPress.org

HTML filtered out of my plugins.. Why ? (12 posts)

  1. AtleGrimseid
    Member
    Posted 14 years ago #

    Well... Just today I took the step upgrading from WPMU 2.7.1 to 2.8.2, it seems like everything went just good. :)

    Or.. Not everything. I have created some plugins for WPMU just to use for myself, and now I'm having some problems with them.

    All the plugins have an administration area, where I with 2.7.1 could type in all kind of html to get it out there in my network. I did not put any code into the plugins who should filter out any code at all. The reason I don't want to filter out any code is because it's me, site admin, who is entering everything... Then I don't think it's a risk entering whatever I want.

    Now, everything was working fine in 2.7.1, but Now that I just upgraded to 2.8.2 all the html that I enter in any plugin is beeing stripped by WPMU.. Any help on why this is happening and how to resolve it so that WPMU no longer filter out my html would be very appreciated. :)

    I don't want to edit any core-files. I want to plugins to be useable for everyone running WPMU. :)

  2. kgraeme
    Member
    Posted 14 years ago #

    My developer coworker found the same problem. Here's the bug ticket with her fix. http://trac.mu.wordpress.org/ticket/1067

    Note: This ticket is just for the Text widget. The same problem may very well exist for other widgets and is probably the same problem.

  3. AtleGrimseid
    Member
    Posted 14 years ago #

    kgraeme, I will try this and come back with a small update in few minutes.

    Thanks. :)

  4. AtleGrimseid
    Member
    Posted 14 years ago #

    I just tried to edit wp-includes\default-widgets.php, witch it said in the ticket, but that did not solve anything for me. Everything is still stripped out by WPMU. In fact, I did not get any difference at all when updating my plugins with new html. Everything was still stripped out.

    kgraeme, do you think this is a bug with WPMU, and that the plugins is actually ok? I must say that I'm not a developer, so I am really not sure if any of my plugins work with other installations...

    I will try one of my plugins with normal WP later today. Some of the plugins should be ok on normal WP also.. (with minor changes) :) If I get the same there I just really don't know what to do.. :/

    I could make the plugins not use any html at all, but that would really not be good if I wanted anyone else running WPMU use them.

    anyway, thanks kgraeme. :)

  5. kgraeme
    Member
    Posted 14 years ago #

    The ticket is specifically only to fix the problem on the Text widget. It won't work for any other widget or plugin, but may provide some clues as to where the problem is for your issue.

    Also note that wordpress/wpmu introduced some security changes to plugins with 2.8.1, specifically dealing with some plugin's admin pages.

  6. AtleGrimseid
    Member
    Posted 14 years ago #

    kgraeme, I just tested using simple html like <a href=""></a> in a text widget, and that seemed to work fine, without doing what's told in the ticket. Short exp.. = I do not have the same problem as DeannaS who reported that ticket.. :/

    I don't have any stripslashes at all in any of my plugins. There is nothing in my plugins telling PHP to strip anything, so this must be something in WPMU core doing this, witch require me to deactivate it somehow... Just don't know what...

    Right now i can't see these 2 "errors" "work togeteher", but I sure do hope we get a solution. After all, it absolutely seems like beeing the same thing causing this.

  7. kgraeme
    Member
    Posted 14 years ago #

    Yeah, I could be totally wrong that they're related problems. It wouldn't be the first time I'm wrong about something.

    What we were seeing with the text widget problem is that slashes were getting escaped so they weren't working.

  8. AtleGrimseid
    Member
    Posted 14 years ago #

    It's about the same thing happening to me kgraeme, but just not in the text-widgets. It's happenig everywhere else. Links turns out to be

    <a href=\"\\\\\\\\\\\\\\"></a>

    and sometimes like:

    <a href=\"\"></a>

    Example may not by correct. I'm just like very tired right now. sorry.

    I understand that the second should work, but it does not... I surte hope I do find some fix for this, and I'll post here as sonn as I do.

  9. parkstreet
    Member
    Posted 14 years ago #

    As a quick fix, you could always include links and img sources without using quotations, or you can use the single quotes and that should work as well.

  10. AtleGrimseid
    Member
    Posted 14 years ago #

    parkstreet, yes, I was thinking about doing it that way.. The only "bad" thing with that solution would be that I no longer can use any kind of html without editing files.

    kgraeme, when I was reading your last post in this thread I wonder how I managed to write that the same thing happens to me below. Guess I was some kind of tired yesterday. :P

  11. DeannaS
    Member
    Posted 14 years ago #

    While both the problem with the text widget and AtleGrimseid's problem have to do with stripslahes, the trac ticket referenced is not related to AtleGrimseid's problem.

    This is the trac ticket that's related to your problem. And, the gist is that you need to alter your plugin code to include stripslashes.

    http://trac.mu.wordpress.org/ticket/1060

  12. AtleGrimseid
    Member
    Posted 14 years ago #

    Thanks a lot DeannaS. That solved everything for me. :)

About this Topic

  • Started 14 years ago by AtleGrimseid
  • Latest reply from AtleGrimseid