ansible/changelogs/fragments/copy-diff-text.yaml
Matt Martz 95e77ac853
Ensure that the src file contents is converted to unicode in diff info (#45744)
* Ensure that the src file contents is converted to unicode in diff info. Fixes #45717

* Fix up and cleanup

* The diff functionality in the callback plugins should have the
  to_text() calls removed since we're now doing it in ActionBase
* catching of UnicodeError and warnings in the callback diff
  functionality from 61d01f549f haven't been
  needed since we switched to to_text so remove them.
* Add a note to ActionBase's diff function giving an example of when the
  diff function will be inaccurate and how to fix it

* Fix callback get_diff() tests

I believe the unittests of callback's get_diff() were wrong.  They were
sending in a list where strings were expected.  Because previous code
was transforming the lists into strings via their repr, the previous
tests did not fail but they would have formatted the test cases output
in an odd way if we had looked at it.
2018-09-20 12:31:48 -05:00

5 lines
262 B
YAML

bugfixes:
- copy - Ensure that the src file contents is converted to unicode in diff
information so that it is properly wrapped by AnsibleUnsafeText to prevent
unexpected templating of diff data in Python3
(https://github.com/ansible/ansible/issues/45717)