strip whitespace from contents anchor references