Avoid innerText for better newline behavior

Fixes #1080, fixes #923.

@jbonta