From 6dd9a66108f83fe771f6be0b16b9a2733d3faa27 Mon Sep 17 00:00:00 2001 From: Dick Visser Date: Fri, 11 Oct 2024 16:27:54 +0200 Subject: [PATCH] fix 276 --- src/pyff/parse.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pyff/parse.py b/src/pyff/parse.py index cb0ad1bf..9162d743 100644 --- a/src/pyff/parse.py +++ b/src/pyff/parse.py @@ -4,6 +4,7 @@ from typing import Any, Dict, List, Optional from pydantic import BaseModel, Field +from urllib.parse import quote as urlescape from xmlsec.crypto import CertDict from pyff.constants import NS @@ -84,7 +85,7 @@ def parse(self, resource: Resource, content: str) -> ParserInfo: n = 0 for fn in find_matching_files(content, self.extensions): child_opts = resource.opts.copy(update={'alias': None}) - resource.add_child("file://" + fn, child_opts) + resource.add_child("file://" + urlescape(fn), child_opts) n += 1 if n == 0: