def _serialize_attributes(attributes):
    result = ''
    for name, value in attributes.items():
        if not value:
            continue
        result += ' ' + _unmangle_attribute_name(name)
        result += '="' + escape(value, True) + '"'
    return result
Serializes HTML element attributes in a name="value" pair form.
dataset/ETHPy150Open quokkaproject/flask-htmlbuilder/flaskext/htmlbuilder.py/_serialize_attributes