Correct the cookie name calculation for titles with spaces

All spaces should be replaced by hyphen

Change-Id: I3c3d7984c231693b7a7ec28d4eda079521fb65c0