testing.com > Testing Craft > Techniques (Handling Bugs) > wvHtml Borders Bug Report

Search

wvHtml Borders Bug Report

Created and summarized by Brian Marick.

This is a bug that I discovered in the AbiWord project. It describes a problem in the way the wvHtml Word-to-HTML converter handles borders around empty cells in Word tables. This bug report is the product of a process of failure improvement described here.

The bug report was sent by email, so it refers to attachments. They are available for download.


To: Caolan McNamara <Caolan.McNamara@ul.ie>
From: Brian Marick <marick@testing.com>
Subject: wvHtml bug: no border on cells with empty text

On IE5.0 and possibly on some versions of Netscape(*), cells with no text
in them display without borders. As far as I can see from the HTML spec,
this is a browser bug, but it's widespread enough that there seems to be a
standard workaround. The portable way to get cell borders to appear is to
put an &nbsp in empty cells.

The first attachment is a Word document with tables. The second is the
wvHtml output. The third is a jpeg of what the wvHTML output looks like
with Netscape 4.5 on my NT machine. Notice that:
- the 2x2 table doesn't show as a 2x2 table, but rather a long,
thin 1x1 table.
- the 2x3 table is missing the middle row, which shows only as a
larger-than-usual gap.
- there's a missing border between the two empty cells in the 3x3 table.

The wvHtml output looks the same when I use IE5.0 to view it.

The fourth attachment is Word 97's export of the same .doc file. Note the
use of &nbsp. It displays with cell borders.

MS FrontPage Express also uses &nbsp in empty table cells.

I'm using 0.5.40 of vwHtml.

===

(*) I say "possibly on some versions of Netscape" because I suspect
Netscape 4.5 on this machine sometimes uses the IE5.0 mshtml.dll HTML
rendering library. I have seen Netscape render wvHtml's 2x2 empty tables
with borders, and someone else who uses Netscape 4.61 on Linux and NT sees
borders on the tables in emptytext.html. So this may not be an issue except
for users who have IE on their machine.

Note, however, that Netscape renders the tables correctly only because of
the <p> and <div> elements. If you take them out, Netscape renders as IE
does. So &nbsp is probably appropriate in all cases, just to make sure
wvHtml continues to work with Netscape even if the <p> or <div> are
optimized away.


Related Testing Craft Pages


Be the first person to add a comment in the Wiki Forum at page WvhtmlBorderBugReport.
(The Forum is explained in its FrontPage.)


Summarized Discussion

In this spot, the author of this page will occasionally summarize the discussion in the Forum.