Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#4049 closed defect (bug) (worksforme)

Wordpress 2.1.2 strips closing P tag causing xhtml validation to fail

Reported by: jayp's profile jayp Owned by:
Milestone: Priority: high
Severity: normal Version: 2.1.2
Component: Administration Keywords: strip p tag xhtml
Focuses: Cc:

Description

I noticed a bug that I did not have prior to version 2.1.

I have an object tag (flash movie) wrapped around a P tag that provides formatting. I'm not using the WYSIWYG editor. The code looks like this:

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

But when Wordpress prints this out in the template, it strips the closing P tag and adds a few line breaks (perhaps no big deal). Viewing the source code reveals this:

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

The page no longer validates as proper xhtml. But if I save this html locally and add that closing P tag manually, it will validate.

I'm quite certain this never happened before 2.1.

This is my first time using trac so please forgive me if I've done something wrong. Incidentally, this issue may be somewhat related to Ticket 3669.

Change History (3)

#1 @foolswisdom
17 years ago

  • Milestone changed from 2.1.3 to 2.2

#2 @rob1n
17 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Worksforme on r5269.

#3 @rob1n
17 years ago

  • Milestone 2.2 deleted
Note: See TracTickets for help on using tickets.