def clean_refvar(refvar: str) -> str:
    """Cleans refvar string of characters that cause issues for filenames.

    Args:
        refvar: A string representing a refvar.

    Returns:
        A cleaned string.
    """
    refvar = refvar.replace(" ", "_")
    refvar = refvar.replace("/", "_")
    return refvar