therealglazou / bluegriffon

BlueGriffon, the Web editor
Mozilla Public License 2.0
295 stars 71 forks source link

cleanup doesn't remove trailing <br /> tags #9

Open garretwilson opened 8 years ago

garretwilson commented 8 years ago

The cleanup functionality that supposedly removes trailing break tags doesn't work for tables, leaving me e.g.:

      <td>blah<br />
      </td>

So if I just create a default table and fill it in, I'm left with lots of <br /> junk unless I edit the file by hand.

The cleanup process BlueGriffon leaves a lot more
tags than desired. In fact I don't want any <br /> tags! I have no need for them, and I didn't ask for them. Please just get rid of them.

therealglazou commented 8 years ago

Can you please attach a test document?

garretwilson commented 8 years ago

Do the following:

  1. Create an XHTML5 document using the wizard, accepting the defaults.
  2. Add a 2 x 2 table using the tool button.
  3. Go into the source and add a <thead> to the table with <th> cells (turning the table into 2 x 3).
  4. Add "foo" and "bar" in the header row.
  5. Add "abc" and "def" in the next row.
  6. Run Tools > Markup Cleaner.

That gives you this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html><html  xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta  charset="UTF-8" />
    <title></title>
    <meta  name="author"  content="Garret Wilson" />
  </head>
  <body>
    <table  border="1"  style="width: 100%">
      <thead>
        <tr>
          <th>foo<br />
          </th>
          <th>bar<br />
          </th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>abc<br />
          </td>
          <td>def<br />
          </td>
        </tr>
        <tr>
          <td><br />
          </td>
          <td><br />
          </td>
        </tr>
      </tbody>
    </table>
  </body>
</html>