def encodeentity(s):
    """ Default encoder for HTML entities: replaces &, <, > and " characters only. """
    return s.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;'
        ).replace('"', '&quot;')
