Mercurial > addons > firefox-addons > feed-preview
comparison js/background.js @ 14:376a0e415bba
Properly handle non-text content in Atom feed elements
The title, subtitle, summary and content elements of Atom feeds can all have
non-text content. When parsing title and subtitle elements HTML and XHTML
content will be stripped of any markup in order to keep it simple. In summary
and content elements markup will be preserved. Element content of any other
type as well as remote content in content elements will be ignored.
author | Guido Berhoerster <guido+feed-preview@berhoerster.name> |
---|---|
date | Mon, 10 Dec 2018 16:38:11 +0100 |
parents | a4590add4901 |
children | a59d322e5826 |
comparison
equal
deleted
inserted
replaced
13:799d633ccd4d | 14:376a0e415bba |
---|---|
46 } | 46 } |
47 ]; | 47 ]; |
48 const FEED_MAGIC = [ | 48 const FEED_MAGIC = [ |
49 '<rss', | 49 '<rss', |
50 '<feed', | 50 '<feed', |
51 ...Object.values(feedParser.XMLNS) | 51 feedParser.XMLNS.ATOM03, |
52 feedParser.XMLNS.ATOM10, | |
53 feedParser.XMLNS.RSS09, | |
54 feedParser.XMLNS.RSS10 | |
52 ]; | 55 ]; |
53 var tabsFeeds = new Map(); | 56 var tabsFeeds = new Map(); |
54 var tabsFeedPreviews = new Map(); | 57 var tabsFeedPreviews = new Map(); |
55 var fetchingFeedPreview = fetch('web_resources/feed-preview.xhtml') | 58 var fetchingFeedPreview = fetch('web_resources/feed-preview.xhtml') |
56 .then(response => response.text()); | 59 .then(response => response.text()); |