fixes a bug when output/error output contains a % character
merged branch schmittjoh/exFix (PR #6716)

This PR was merged into the 2.1 branch.

Commits
-------

785d365 fixes a bug when output/error output contains a % character

Discussion
----------

fixes a bug when output/error output contains a % character