remove whitespace from ref target name