def attval(self, text,
               whitespace=re.compile('[\n\r\t\v\f]')):
        encoded = self.encode(whitespace.sub(' ', text))
        if self.in_mailto and self.settings.cloak_email_addresses:
            # Cloak at-signs ("%40") and periods with HTML entities.
            encoded = encoded.replace('%40', '&#37;&#52;&#48;')
            encoded = encoded.replace('.', '&#46;')
        return encoded
Cleanse, HTML encode, and return attribute value text.
dataset/ETHPy150Open zackw/header-survey/sphinx/ext/html5_output.py/BaseTranslator.attval