import json


def eval_functions_dumps(obj):
    """
    This is a replacement for json.dumps that
    does not quote strings that start with 'function', so that
    these functions are evaluated in the HTML code.
    """
    if isinstance(obj, str):
        if obj.lstrip().startswith("function"):
            return obj
    if isinstance(obj, list):
        return "[" + ", ".join(eval_functions_dumps(i) for i in obj) + "]"
    if isinstance(obj, dict):
        return (
            "{"
            + ", ".join(
                f'"{key}": {eval_functions_dumps(value)}' for key, value in obj.items()
            )
            + "}"
        )
    return json.dumps(obj)