Add a more robust XML check (#4226)

This commit is contained in:
Erik Jan de Wit 2023-01-19 15:32:54 +01:00 committed by GitHub
parent 2fa230bdd2
commit 2d4ba721b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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");