Used TextNodes to protect against XSS

This time I set coding style to use tabs in WebStorm.
It's still gone and Linted a few of the lines. I'll let these stand in
this diff.