Webserver: fix handling varnames with spaces