This project has moved and is read-only. For the latest updates, please go here.

Anchor In <TD>

Sep 6, 2012 at 6:59 PM
Edited Sep 6, 2012 at 8:06 PM

I have an html document that I am converting that contains a formatted <table> tag. Within the first <td> of the table is a valid <a> tag. When the document is created from the html the content of the first cell is empty.

Has anyone else experienced this issue? If so, can you point me in the right direction on a potential fix?



Found the issue in the ProcessClosingTableColumn method of the HtmlConverter.ProcessTag.cs file.

The following conditional check removes the Hyperlink.

if (p != null && !p.HasChild<Run>())

I have modified locally as follows.

if (p != null
    && !p.HasChild<Run>()
    && !p.HasChild<Hyperlink>())

Please let me know if this is more of an issue than a solution as I don't fully understand the underpinnings of OpenXML.

Sep 7, 2012 at 12:59 PM

Thank you for your feedback. Yes it sounds like a bug and I need to check whether this should occurs with other elements.