EDIT: This issue was fixed by upgrading from 14.3 to 14.8 version of the DLL.
When an anchor is included in the html string, and InsertHtml is used, the following error always occurs:
[NullReferenceException: Object reference not set to an instance of an object.]
.(String ) +129
.( ) +147
.( ) +449
.( ) +54
.( ) +304
.( ) +54
.( ) +304
.( ) +54
.( ) +304
.( ) +54
.(String , DocumentBuilder ) +154
Aspose.Words.DocumentBuilder.InsertHtml(String html) +266
Code to generate this error (C#):
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
string html = “Text [1]
[1] Footnote text.”;
builder.InsertHtml(html); //always causes error with above html string
MemoryStream stream = new MemoryStream();
doc.Save(stream, SaveFormat.Docx);
I’ve been able to track the error down to the InsertHtml method incorrectly parsing the element. The tags are being generated as footnote links from Microsoft Word, then copied and pasted into a CKEditor, and being saved to our database. Then, the html string is extracted from the database and inserted into the DocumentBuilder via InsertHtml.
I’m looking at this as a bug in InsertHtml, since you should be able to use anchor tags with or without fully qualified domain names.