From 3b08bbc768e60c2e0fb8aa7652f1ff896cc3731d Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Fri, 12 May 2023 17:10:22 -0700 Subject: [PATCH] fix(parse): Preserve stringified numbers with leading zeros Signed-off-by: Christopher Ng --- source/tools/dav.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/tools/dav.ts b/source/tools/dav.ts index 74c4ac6c..75732b66 100644 --- a/source/tools/dav.ts +++ b/source/tools/dav.ts @@ -76,7 +76,8 @@ export function parseXML(xml: string): Promise { return new Promise(resolve => { const result = xmlParser.parse(xml, { arrayMode: false, - ignoreNameSpace: true + ignoreNameSpace: true, + parseTrueNumberOnly: true // // We don't use the processors here as decoding is done manually // // later on - decoding early would break some path checks. // attrValueProcessor: val => decodeHTMLEntities(decodeURIComponent(val)),