WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#2495 closed defect (bug) (worksforme)

Problem with "HTML Source Editor" in WordPress 2.01

Reported by: jazzmansblog Owned by:
Milestone: Priority: high
Severity: major Version: 2.0.1
Component: Administration Keywords: iframe
Focuses: Cc:

Description

The new html source editor does not convert iframe tags correctly.

It converts <iframe></iframe> to <iframe />. The trailing </iframe> is left out and a / is added to the end of the <iframe> tag.

Change History (5)

comment:1 davidhouse8 years ago

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

What's wrong with that? If you don't put anything in between the start and end tags, then that's valid XHTML. Reopen if you can explain.

comment:2 DanS428 years ago

  • Resolution invalid deleted
  • Severity changed from critical to major
  • Status changed from closed to reopened

I'm having the same issue, and it is a problem for two reasons. Here's an example from my WP blog.

 <iframe style="width: 100%; height: 165px" marginwidth="0" marginheight="0"
 src="http://shaurette.net/VerbShelf.html" frameborder="0" >
 <!-- A link is placed here for those who cannot display IFRAMES -->
 <p><A HREF="http://shaurette.net/VerbShelf.html">View my bookshelf</A></p>
 </iframe>

Is being changed to...

<iframe style="width: 100%; height: 165px" marginwidth="0" marginheight="0"
src="http://shaurette.net/VerbShelf.html" frameborder="0" />

This is bad because not only does this strip out the text in between the iframe tags, but also this seems to break my template. Even though the view source shows the rest of the page is present, my browser chokes and displays nothing after the iframe.

comment:3 sdiz8 years ago

This is valid XML, but *NOT* valid XHTML.
According to XHTML Spec 1.0,

Section 4.3 For non-empty elements, end tags are required

In XHTML1.0 Transitional DTD

<!ELEMENT iframe %Flow;>

iframe is not a empty element.

comment:4 sdiz8 years ago

Sorry... I should be refering to C.3. Element Minimization and Empty Element Content, not 4.3

comment:5 johnbillion7 years ago

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

Worksforme in 2.1.3-alpha and 2.2-bleeding at r5036. Iframes can be inserted correctly using the HTML editor.

Note: See TracTickets for help on using tickets.