def format_line(line):
    """
    Formats a line to required representation.
    :param line:
    :return: string url encoded.
    """
    if line:
        return line.replace("\"", "%22").replace("\n", "%0a").replace(" ", "+")