core: do not allow newlines in candidate names