trim whitespace so parseHTML only contains HTML
Merge pull request #4993 from drwelby/master

Trim whitespace so parseHTML only contains HTML