Undo XML parser customizations (#683)

* Undo XML parser customizations

These did more harm then good, breaking many legit feeds in weird ways.

* Undo changelog

---------

Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Co-authored-by: Will Hunt <will@half-shot.uk>
This commit is contained in:
Tadeusz Sośnierz 2023-03-24 15:16:54 +01:00 committed by GitHub
parent f6475a5182
commit 5ccd64acd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View File

@ -1 +0,0 @@
Relax the Feed parser so that it allows RSS feeds with HTML elements in them.

View File

@ -89,14 +89,7 @@ function normalizeUrl(input: string): string {
export class FeedReader {
private readonly parser = new Parser({
xml2js: {
// Allow HTML bodies, such as value-less attributes.
strict: false,
// The parser will break if we don't do this, as it defaults to `res.FEED` rather than `res.feed`.
normalizeTags: true,
}
});
private readonly parser = new Parser();
private connections: FeedConnection[];
// ts should notice that we do in fact initialize it in constructor, but it doesn't (in this version)