**Reproduce on main:**
- Run a DAG
- Rename the DAG
- Wait for dag file processor to remove the deleted DAG and add the new one. (Old Dag should not appear on the home page anymore)
- Go to the Browse DAGRUN page.
- Click on a DagRun of the deleted DAG, as if you want to see the 'details/grid' of that old dag run

More info and screenshots here:
https://github.com/notifications#discussioncomment-6898570

![image](https://github.com/apache/airflow/assets/14861206/7af81643-6278-4d90-a20f-6aa7b259ce59)



"""
    Remove all parameters starting with `_`.
    :param args: arguments of request
    :return: copy of the dictionary passed as input with args starting with `_` removed.
    """
    return {key: value for key, value in args.items() if not key.startswith("_")}
#
#
#
_WHATWG_C0_CONTROL_OR_SPACE = (
    "\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c"
    "\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f "
)
def get_safe_url(url):
    """Given a user-supplied URL, ensure it points to our web server."""
    if not url:
        return url_for("Airflow.index")
    
    
    if ";" in unquote(url):
        return url_for("Airflow.index")
    url = url.lstrip(_WHATWG_C0_CONTROL_OR_SPACE)
    host_url = urlsplit(request.host_url)
    redirect_url = urlsplit(urljoin(request.host_url, url))
    if not (redirect_url.scheme in ("http", "https") and host_url.netloc == redirect_url.netloc):
        return url_for("Airflow.index")
    
    return redirect_url.geturl()
def get_date_time_num_runs_dag_runs_form_data(www_request, session, dag):