Because the jQuery ID selector is used, and spaces are not valid for HTML IDs. $("#some id") will search for the tag inside a tag with ID "some" rather than the tag with the (invalid) ID "some id" as you would want. A possible solution would be either to make spaces invalid in the application or to do some processing to make exported IDs unique and without spaces (other unused characters such as '~' or '^' all have to be escaped in jQuery selectors, so this is easier said than done).
Because the jQuery ID selector is used, and spaces are not valid for HTML IDs. $("#some id") will search for the tag inside a tag with ID "some" rather than the tag with the (invalid) ID "some id" as you would want. A possible solution would be either to make spaces invalid in the application or to do some processing to make exported IDs unique and without spaces (other unused characters such as '~' or '^' all have to be escaped in jQuery selectors, so this is easier said than done).