diff --git a/docling_core/types/doc/document.py b/docling_core/types/doc/document.py index 4f1941e..392ceb9 100644 --- a/docling_core/types/doc/document.py +++ b/docling_core/types/doc/document.py @@ -14,7 +14,7 @@ from io import BytesIO from pathlib import Path from typing import Any, Dict, Final, List, Literal, Optional, Tuple, Union -from urllib.parse import unquote +from urllib.parse import quote, unquote import pandas as pd import yaml @@ -830,7 +830,7 @@ def export_to_markdown( ): return default_response - text = f"\n![Image]({str(self.image.uri)})\n" + text = f"\n![Image]({quote(str(self.image.uri))})\n" return text else: @@ -884,7 +884,7 @@ def export_to_html( ): return default_response - img_text = f'' + img_text = f'' return f"
{caption_text}{img_text}
" else: