Remove too strict check
This commit is contained in:
parent
e212793337
commit
8b36080587
|
@ -7,7 +7,7 @@ for (const feed of fs
|
||||||
try {
|
try {
|
||||||
const xml: any = xmlbuilder2.convert(
|
const xml: any = xmlbuilder2.convert(
|
||||||
fs.readFileSync(`static/feeds/${feed}`, "utf8"),
|
fs.readFileSync(`static/feeds/${feed}`, "utf8"),
|
||||||
{ format: "object", wellFormed: true }
|
{ format: "object" }
|
||||||
);
|
);
|
||||||
if (xml?.feed?.updated === undefined)
|
if (xml?.feed?.updated === undefined)
|
||||||
throw new Error("Can’t find xml.feed.updated");
|
throw new Error("Can’t find xml.feed.updated");
|
||||||
|
|
|
@ -298,7 +298,6 @@ function renderHTML(component: React.ReactElement): string {
|
||||||
function renderXML(xml: object): string {
|
function renderXML(xml: object): string {
|
||||||
return xmlbuilder2.convert({ invalidCharReplacement: "" }, xml, {
|
return xmlbuilder2.convert({ invalidCharReplacement: "" }, xml, {
|
||||||
format: "xml",
|
format: "xml",
|
||||||
wellFormed: true,
|
|
||||||
noDoubleEncoding: true,
|
noDoubleEncoding: true,
|
||||||
prettyPrint: true
|
prettyPrint: true
|
||||||
});
|
});
|
||||||
|
@ -307,7 +306,6 @@ function renderXML(xml: object): string {
|
||||||
function parseXML(xml: string): any {
|
function parseXML(xml: string): any {
|
||||||
return xmlbuilder2.convert({ invalidCharReplacement: "" }, xml, {
|
return xmlbuilder2.convert({ invalidCharReplacement: "" }, xml, {
|
||||||
format: "object",
|
format: "object",
|
||||||
wellFormed: true,
|
|
||||||
noDoubleEncoding: true
|
noDoubleEncoding: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue