#17368 closed defect (bug) (fixed)
Visual editor (TinyMCE) should respect empty html tags with attributes
Reported by: | designsimply | Owned by: | azaozz |
---|---|---|---|
Milestone: | 3.2 | Priority: | normal |
Severity: | normal | Version: | 3.2 |
Component: | TinyMCE | Keywords: | needs-patch |
Focuses: | Cc: |
Description
The visual editor (TinyMCE) is no longer respecting empty html tags with attributes such as <br class="spacer_" />
or padded <p>
tags like <p> </p>
.
Steps to reproduce:
- Open a new post on a WordPress trunk install.
- Add the example code from below.
- Switch back and forth between the Visual and HTML editor tabs.
- Expected: I expect the html in the example code to be preserved, i.e. the extra line break and empty paragraph spacing to be respected as long as they have attributes.
- Actual: Padding is being removed when it shouldn't.
Example code:
<p>We should preserve padded Ps.</p> <p> </p> <p>And empty html tags with attributes.</p> <p class="spacer_"></p> <p>one</p> <br class="spacer_" /> <p>two</p> <br class="spacer_" /> <br class="spacer_" /> <p>three</p> <br class="spacer_" /> <br class="spacer_" /> <br class="spacer_" /> <p>stop</p>
Tested with r17848 on Chrome 11 beta and Firefox 4.0.1.
Change History (4)
Note: See
TracTickets for help on using
tickets.
Output after a switch from HTML to Visual and back with example code from designsimply:
Trunk:
3.1.2: