def METHOD_NAME(options, keys_to_html_escape: list[str] = []):
    escaped_options = {}
    for (key, value) in options.items():
        if key in keys_to_html_escape:
            escaped_options[key] = html.escape(value)
        else:
            escaped_options[key] = html.escapejs(value)
    return escaped_options