Skip to content

Conversation

@oleibman
Copy link
Contributor

@oleibman oleibman commented Nov 17, 2019

  1. Codes meant to be in hex are specified in decimal.
    Consequently characters which don't need escaping are escaped.
  2. Special handling (prepend backslash) needed for {, }, and .
    RTF docs generated with those characters cannot be opened in Word.
  3. Tab character needs to be escaped as \tab.
    RTF docs drop these characters.
    While running test suite, found that Writer/RTF/ElementTest was coded
    only for Unix line endings, and fails on Windows. Changed so that it
    would work on either.

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

Checklist:

  • I have run composer run-script check --timeout=0 and no errors were reported
  • The new code is covered by unit tests (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes

Owen Leibman added 3 commits November 16, 2019 21:37
1. Codes meant to be in hex are specified in decimal.
   Consequently characters which don't need escaping are escaped.
2. Special handling (prepend backslash) needed for {, }, and \.
   RTF docs generated with those characters cannot be opened in Word.
3. Tab character needs to be escaped as \tab.
   RTF docs drop these characters.
While running test suite, found that Writer/RTF/ElementTest was coded
only for Unix line endings, and fails on Windows. Changed so that it
would work on either.
1. Codes meant to be in hex are specified in decimal.
   Consequently characters which don't need escaping are escaped.
2. Special handling (prepend backslash) needed for {, }, and .
   RTF docs generated with those characters cannot be opened in Word.
3. Tab character needs to be escaped as \tab.
   RTF docs drop these characters.
While running test suite, found that Writer/RTF/ElementTest was coded
only for Unix line endings, and fails on Windows. Changed so that it
    would work on either.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 94.631% when pulling 00f9bb5 on oleibman:master into b8346af on PHPOffice:develop.

@oleibman
Copy link
Contributor Author

No documentation change is required. I see that some people have been able to convert that checkbox to the equivalent of "not applicable", but I don't see how to do that, so I've just checked it for now.

@troosan troosan added this to the v0.18.0 milestone Dec 8, 2019
@troosan troosan changed the title Errors in RTF Escaping Improvements in RTF writer Dec 8, 2019
@troosan troosan merged commit 5940d18 into PHPOffice:develop Dec 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants