Fixes #2969 by only stripping HTML whitespace from document.title