### Apache Airflow version

2.2.1

### Operating System

Linux 5.4.149-73.259.amzn2.x86_64

### Versions of Apache Airflow Providers

default for 2.2.1

### Deployment

Other 3rd-party Helm chart

### Deployment details

aws eks using own-developed helm chart

### What happened

When trying to open log from gantt view - receiving an exception
```
  File "/home/airflow/.local/lib/python3.9/site-packages/pendulum/parsing/__init__.py", line 177, in _parse_common
    return date(year, month, day)
ValueError: year 0 is out of range
```

due to incorrect query parameter push: no value for `execution_date` pushed
```
/log?dag_id=report_generator_daily&task_id=check_quints_earnings&execution_date=
```

### What you expected to happen

Logs should be available

### How to reproduce

Open dag's `gantt` chart
click on task ribbon
click on `log`
observe an error

### Anything else

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

airflow/www/views.py
DateTimeWithNumRunsWithDagRunsForm,
    TaskInstanceEditForm,
)
from airflow.www.widgets import AirflowModelListWidget
PAGE_SIZE = conf.getint('webserver', 'page_size')
FILTER_TAGS_COOKIE = 'tags_filter'
FILTER_STATUS_COOKIE = 'dag_status_filter'
def truncate_task_duration(task_duration):
    """
    Cast the task_duration to an int was for optimization for large/huge dags if task_duration > 10s
    otherwise we keep it as a float with 3dp
    """
    return int(task_duration) if task_duration > 10.0 else round(task_duration, 3)
def get_safe_url(url):
    """Given a user-supplied URL, ensure it points to our web server"""
    valid_schemes = ['http', 'https', '']
    valid_netlocs = [request.host, '']
    if not url:
        return url_for('Airflow.index')
    parsed = urlparse(url)
    
    
    if ';' in unquote(url):
        return url_for('Airflow.index')
    query = parse_qsl(parsed.query, keep_blank_values=True)
    url = parsed._replace(query=urlencode(query)).geturl()
    if parsed.scheme in valid_schemes and parsed.netloc in valid_netlocs:
        return url
    return url_for('Airflow.index')
def get_date_time_num_runs_dag_runs_form_data(www_request, session, dag):