Fixes #2969 by only stripping HTML whitespace