fix zero or more spaces around key and value