Support » Fixing WordPress » I’m quite certain I’ve found a bug with WordPress’s processing of input

  • I think I’ve got a real honest bug here.

    My pages were no longer validating for XHTML when they had been before, so I did some investigating and discovered the problem.

    First off, here’s a sample page:

    Second, here’s the code that I’m entering for the embedded flash movie into the editor (using the quicktags not WYSIWYG editor):

    <p class="center"><object type="application/x-shockwave-flash" style="width:425px; height:350px" data=""><param name="movie" value=""></param></object>

    Third, here’s why the validation error occurs. WordPress is leaving off the trailing `

    tag when it spits this block out. Here's the code.

    <p class=”center”>
    <object type=”application/x-shockwave-flash” style=”width:425px; height:350px” data=””>
    <param name=”movie” value=””></param>
    If I change the tags to <div> tags, then it doesn’t chop anything off and the page validates…

    And just to mention it, I did turn off the option “WordPress should correct invalidly nested XHTML automatically” in case that was somehow related. It made no difference.

    Is this the right place to submit a bug like this? Anyone else experienced anything similar? Anything else I should know?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Your post is messed up, so nobody can understand what you’re talking about. Could you clarify? What exactly is being done to the code you’re pasting in?

    Sorry. I didn’t realize that the forums had mangled my post. I’ve never gotten code to format correctly in these forums.

    The bottom line is that the trailing P tag is getting left off after the last OBJECT tag. If I look at the source code, it’s not there. But in the edit screen, there is a P tag after the closing OBJECT tag. So WordPress is removing it when it spits out the post.

    Before upgrading to 2.1.0, these pages were validating properly and had that closing P tag.

    use this: 😀

    You might try this. Or this.

    And to get code to work, you just need to surround it with the ` thing. (on your keyboard, to the left of “1”)

    It’s really simple. I’m wrapping an OBJECT tag with P tags in the quicktags editor (NOT WYSIWYG editor). WordPress is stripping the closing P tag, even though I can go back and look at the post edit field and it’s there. (In other words, that closing P tag is stored with the post in the database but stripped at the time WordPress prints it out).

    I am absolutely sure that WordPress did not do such a thing prior to 2.1.

    Thus it’s a bug. I’m submitting it to Trac (something I’ve never done before). I assume this is the proper way to report bugs?

    Yep – and search for it there first. I’m 99% positive you’ll find it already in trac and already discussed here in the forums.

    But if I’m wrong, you’ll want to create a new one.

    I agree – but I’m just saying that I’ve seen this issue on the forum before. I remember it only a couple of weeks after I got 2.1 myself (and had the same problem), and the threads I linked to – although they are talking about 2.0 – those solutions worked and got rid of the problem.

    Which is why I linked to them for you. I don’t think it’s bad to report it to trac – but I thought you might find that solution (the $pee one, in formatting.php – commenting out line 64 or something) works very well in the meantime.

    Thanks Doodlebee. I have to admit that i didn’t look at my source code for that solution? Why? Because that post was a few months back, and issues in Trac are listed as fixed when it comes to this problem. So I submitted it to trac and referenced the old bugs because I’m guessing it’s something that hasn’t been fixed.

    For example, if I wrap an image tag with P tags, it doesn’t strip the ending P tag. But at least for these object tags, it does.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Issues in trac are not always referring to the latest “released” code when they say something is fixed. They’re probably saying it’s fixed in the latest SVN code (2.2-bleeding).

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘I’m quite certain I’ve found a bug with WordPress’s processing of input’ is closed to new replies.