remove tag's leading and trailing whitespace