I'm not sure if we need this and if there is no similar way to strip the white-spaces maybe it's good idea to extract it from the extension for example to [Sanitizer](https://github.com/Wikia/app/blob/dev/includes/Sanitizer.php#L31). The `Sanitizer` has private method `Sanitizer::normalizeWhitespace()` but it's probably something different.