[Fix #1352] WordArray accepts special characters

Instead of whitelisting all word characters, it should be enough to
just blacklist all space characters.