Set "preserve whitespace" attribute on text elements when we modify their content. (Documents can lose spaces otherwise.)