Skip to content

Commit

Permalink
fix(Xbel): Don't attempt to parse numbers
Browse files Browse the repository at this point in the history
fixes #1657

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Jul 6, 2024
1 parent 385b47d commit 96c8cb8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/serializers/Xbel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ class XbelSerializer implements Serializer {
}

deserialize(xbel: string) {
const parser = new XMLParser({preserveOrder: true, ignorePiTags: true, ignoreAttributes: false})
const parser = new XMLParser({
preserveOrder: true,
ignorePiTags: true,
ignoreAttributes: false,
parseTagValue: true,
})
const xmlObj = parser.parse(xbel)

if (!Array.isArray(xmlObj[0].xbel)) {
Expand Down

0 comments on commit 96c8cb8

Please sign in to comment.