Skip to content

Tables inside a bullet list result in a corrupt docx file #1466

Open
@10types

Description

@10types

This is:

Expected Behavior

Creating a table inside a bullet list is valid HTML and valid docx behaviour. In HTML it results in a bullet next to the table. In Word it results in an empty line with the bullet, then the table indented below.

Current Behavior

The XML created looks like it should work, but instead it creates a docx file that refuses to open as it is considered corrupt.

Failure Information

"Unspecified error. Location: Part: /word/document.xml, Line: 0, Column: 0"

How to Reproduce

Feed the following into PHPOffice:

<ul>
<li>I'm a bullet</li>
<li><table><tr><td>I'm a cell</td></tr></table></li>
<li>I'm a bullet</li>
</ul>

Context

  • PHP version:
  • PHPWord version: 0.14

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions