def quote_html(content):
    """
    Quote HTML symbols

    All <, >, & and " symbols that are not a part of a tag or
    an HTML entity must be replaced with the corresponding HTML entities
    (< with &lt; > with &gt; & with &amp and " with &quot).

    :param content: str
    :return: str
    """
    new_content = ''
    for symbol in content:
        new_content += HTML_QUOTES_MAP[symbol] if symbol in _HQS else symbol
    return new_content
def quote_html ( content ) : new_content = '' for symbol in content : new_content += HTML_QUOTES_MAP [ symbol ] if symbol in _HQS else symbol return new_content
Quote HTML symbols

    All <, >, & and " symbols that are not a part of a tag or
    an HTML entity must be replaced with the corresponding HTML entities
    (< with &lt; > with &gt; & with &amp and " with &quot).

    :param content: str
    :return: str