npm init fails when project folder name has a space

What I Wanted to Do

npm init

What Happened Instead

npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name “web chat”: Tags may not have any characters that encodeURIComponent encodes.

Reproduction Steps

Create a project folder with a space in the name, example: “web chat”.
Run npm init from inside that folder.

Details

Platform Info

npm --versions 5.5.1 node -p process.platform
win32