Composer adds missing closing tags badly in Reformat HTML Source mode

RESOLVED DUPLICATE of bug 129508

Status

()

Core
Serializers
--
minor
RESOLVED DUPLICATE of bug 129508
15 years ago
15 years ago

People

(Reporter: Jim Booth, Assigned: harishd)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.4b) Gecko/20030514
Build Identifier: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.4b) Gecko/20030514

When composer finds an unclosed tag, such as <p>, it adds the closing tag, but
in the following example it creates bad HTML by doing so.

Reproducible: Always

Steps to Reproduce:
1. Open a new page in composer
2. Switch to HTML source view
3. Paste the sample code below into the <body>. 
4. Switch to Normal View, and back to HTML Source view
Actual Results:  
Composer adds the missing </p> tag AFTER the </table>, resulting in bad HTML. 
(There are <p> tags inside the table now nested within another <p>.)


Expected Results:  
Composer should add the </p> BEFORE THE <table>, 

It would be nice if Composer would notify the user of the correction it made. 
This is particularly annoying when you switch between views in the middle of
editing your code and composer adds a tag you were intending to add yourself.  

Perhaps a preference to turn off adding tags, or a prompt with an "ok/cancel"
before it does so.

SAMPLE CODE:  (note the unclosed <p> before the <table>)
--------------------------------------------
<p>This is text above the table
<table>
  <tbody>
    <tr>
      <td valign="top">
      <p>This is text in the table</p>
      </td>
    </tr>
  </tbody>
</table>
--------------------------------------------

Sorry if this is a dupe, but I couldn't find it.  Hope I got the right component.

Comment 1

15 years ago

*** This bug has been marked as a duplicate of 129508 ***
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.