URL-encode FQN in catalog header links (spaces -> %20)

This commit is contained in:
Petr 2026-03-15 02:06:22 +01:00
parent 60039c0af3
commit d9f3977028

View file

@ -20,6 +20,7 @@ import os
from datetime import datetime, timezone from datetime import datetime, timezone
from pathlib import Path from pathlib import Path
from typing import Any, Dict, List, Optional from typing import Any, Dict, List, Optional
from urllib.parse import quote
import yaml import yaml
@ -82,7 +83,7 @@ def _yaml_header(catalog_url: str, fqn: str = "", entity_type: str = "") -> str:
""" """
timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
if fqn and entity_type: if fqn and entity_type:
source_url = f"{catalog_url}/{entity_type}/{fqn}" source_url = f"{catalog_url}/{entity_type}/{quote(fqn, safe='.')}"
else: else:
source_url = catalog_url source_url = catalog_url
lines = [ lines = [