'returns 1 if attr_value has to be base-64 encoded because
of special chars or because attr_type is in self._base64_attrs'

def _needs_base64_encoding(self, attr_type, attr_value):

    return (self._base64_attrs.has_key(attr_type.lower()) or (not (safe_string_re.search(attr_value) is None)))
