Fixes #2969 by only stripping HTML whitespace
Removing unnecessary string trimming
Merge pull request #2994 from mechaxl/master

Only strip HTML whitespace in the document.title getter (fixes #2969); r=Ms2ger