You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you load a Word 2007 file that has invalid XML characters in the content (for example xml-characters-in.docx) and then immediately try to save that file back out doing something like this:
This is probably related to #671, #401, #514, and other similar issues. However, I don't have a chance to scrub the content because I am reading and then immediately trying to save the result.
Maybe the Reader should scrub the incoming $textContent?
hello, any news on it? I've got the same problem... A simple sollution (not full) was a modification in src/PhpWord/Reader/Word2007/AbstractPart.php line 241 to: $parent->addText(htmlspecialchars($textContent), $fontStyle, $paragraphStyle);
(added htmlspecialchars)
If you load a Word 2007 file that has invalid XML characters in the content (for example xml-characters-in.docx) and then immediately try to save that file back out doing something like this:
You get a corrupted Word file back (see xml-characters-out.docx).
This is probably related to #671, #401, #514, and other similar issues. However, I don't have a chance to scrub the content because I am reading and then immediately trying to save the result.
Maybe the Reader should scrub the incoming $textContent?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: