tag.js: handle corner case when checking for space