This project has moved. For the latest updates, please go here.

Anchor In <TD>

Sep 6, 2012 at 5:59 PM
Edited Sep 6, 2012 at 7: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?

Thanks

EDIT:

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>())
{
    p.Remove();
}

I have modified locally as follows.

if (p != null
    && !p.HasChild<Run>()
    && !p.HasChild<Hyperlink>())
{
    p.Remove();
}

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

Coordinator
Sep 7, 2012 at 11:59 AM

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