-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docx is invalid if the written attributed string contains an ampersand (&) or less-than (<) character #18
Comments
Replacing the |
One more thing: the DocXOptions (e.g. author, title, etc.) should be sanitized as well. If those strings include ampersands and less-than symbols, then the docx will give a warning when it is opened in Word. |
I have a fix, and will submit a pull request shortly. |
This will properly escape reserved characters that appear in the document and in the DocXOptions. shinjukunian#18
again , thank you for catching and fixing this issue. |
This is easy to repro using these simple tests:
If you then run these tests, they will fail with: [DocXTests.DocXTests testAmpersand] : failed - The file…couldn’t be opened because it isn’t in the correct format.
The text was updated successfully, but these errors were encountered: