From 2d4ba721b8b0515961836dd04b02587a0f69dade Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Thu, 19 Jan 2023 15:32:54 +0100 Subject: [PATCH] Add a more robust XML check (#4226) --- apps/admin-ui/src/clients/import/ImportForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/admin-ui/src/clients/import/ImportForm.tsx b/apps/admin-ui/src/clients/import/ImportForm.tsx index 65478a9983..35ed187a3c 100644 --- a/apps/admin-ui/src/clients/import/ImportForm.tsx +++ b/apps/admin-ui/src/clients/import/ImportForm.tsx @@ -32,7 +32,7 @@ import { FormFields } from "../ClientDetails"; import { toClient } from "../routes/Client"; import { toClients } from "../routes/Clients"; -const isXml = (text: string) => text.startsWith("<"); +const isXml = (text: string) => text.match(/(<.[^(><.)]+>)/g); export default function ImportForm() { const { t } = useTranslation("clients");