'Replace certain Unicode characters with named HTML entities.
This differs from data.encode(encoding, \'xmlcharrefreplace\')
in that the goal is to make the result more readable (to those
with ASCII displays) rather than to recover from
errors. There\'s absolutely nothing wrong with a UTF-8 string
containg a LATIN SMALL LETTER E WITH ACUTE, but replacing that
character with "&eacute;" will make it more readable to some
people.'

@classmethod
def substitute_html(cls, s):

    return cls.CHARACTER_TO_HTML_ENTITY_RE.sub(cls._substitute_html_entity, s)
