I dug into why we never did this before, and it turns out we did, but using `$.trim()` (which removes leading whitespace as well!). When removing the `$.trim()` usage. Fixes #3294.