ckan/ckan — pull request #1971 by aliceh75 (2014-10-10 11:53:40+00:00)
Title: Ensure that field names are stripped

Having field names that start/end with spaces causes a lot of complications, because some code strips the field names, while others don't. This is particularly true when using third party libraries, and parsing text-representations of strings such as the sort string "my field ASC, my other field DESC", etc.

See for instance: #1970

Given that there is no practical use for having field names that start or end with spaces (these will be just as confusing to humans as they are to machines), I suggest to disallow them.

At the same time I suggest that the Datapusher should strip field names before uploading data. I have already submitted a PR for this at : https://github.com/ckan/datapusher/pull/47