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