diff --git a/backend/library/utils.py b/backend/library/utils.py index a9be619fd..464d1924d 100644 --- a/backend/library/utils.py +++ b/backend/library/utils.py @@ -28,7 +28,7 @@ logger = structlog.get_logger(__name__) -URN_REGEX = r"^urn:([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)(?::([a-zA-Z0-9_-]+))?:(.+)$" +URN_REGEX = r"^urn:([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)(?::([a-zA-Z0-9_-]+))?:(\S+)$" def match_urn(urn_string): diff --git a/frontend/src/lib/utils/constants.ts b/frontend/src/lib/utils/constants.ts index 8c57cda78..df3a93e92 100644 --- a/frontend/src/lib/utils/constants.ts +++ b/frontend/src/lib/utils/constants.ts @@ -37,7 +37,7 @@ export const UUID_REGEX = '([0-9a-f]{8}\\-[0-9a-f]{4}\\-[0-9a-f]{4}\\-[0-9a-f]{4 export const UUID_LIST_REGEX = new RegExp(`^${UUID_REGEX}(,${UUID_REGEX})*$`); export const URN_REGEX = - /^urn:([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)(?::([a-zA-Z0-9_-]+))?:(.+)$/; + /^urn:([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)(?::([a-zA-Z0-9_-]+))?:(\S+)$/; export const LOCALE_DISPLAY_MAP = { en: '🇬🇧 English',