Correctly process whitespace in DOM text mapper. Fixes #666
One more addition to DOM text mapper code.
Merge branch 'master' into development