We do not strip leading or trailing spaces when importing a theme or theme component from the web. A 500 error is generated, which does not provide the user details on how to resolve the issue.
We should strip leading/trailing spaces when attempting to import themes, or provide a useful error message to the user.