import re


def filter_input(query):
    """Takes a string and prepares it to be used in a web query

    Parameters
    ---
    query: string

    Returns
    ---
    string
    """

    return re.sub(r"\s+", "+", query)