Clean up tag names with spaces client-side