diff --git a/toolkit/components/feeds/public/nsIFeed.idl b/toolkit/components/feeds/public/nsIFeed.idl index bbcdb78cbfd..2fc0a7f3a02 100644 --- a/toolkit/components/feeds/public/nsIFeed.idl +++ b/toolkit/components/feeds/public/nsIFeed.idl @@ -44,16 +44,14 @@ interface nsIArray; /** * An nsIFeed represents a single Atom or RSS feed. */ -[scriptable, uuid(29884967-afaa-43ce-ad10-8234deebea15)] +[scriptable, uuid(9472ff5b-10dc-4aed-a861-7619d7a4b5bf)] interface nsIFeed : nsIFeedContainer { /** * Uses description, subtitle, and extensions * to generate a summary. - * - * @param stripTags remove HTML if true. */ - AString subtitle(in boolean stripTags); + attribute nsIFeedTextConstruct subtitle; // All content classifies as a "feed" - it is the transport. const unsigned long TYPE_FEED = 0; @@ -82,13 +80,13 @@ interface nsIFeed : nsIFeedContainer * It supposedly enables some sort of interaction with an XML-RPC or * SOAP service. */ - attribute nsIPropertyBag2 cloud; + attribute nsIWritablePropertyBag2 cloud; /** * An image url and some metadata (as defined by RSS2). * */ - attribute nsIPropertyBag2 image; + attribute nsIWritablePropertyBag2 image; /** * No one really knows what textInput is for. @@ -97,7 +95,7 @@ interface nsIFeed : nsIFeedContainer * * for more details. */ - attribute nsIPropertyBag2 textInput; + attribute nsIWritablePropertyBag2 textInput; /** * Days to skip fetching. This field was supposed to designate diff --git a/toolkit/components/feeds/public/nsIFeedContainer.idl b/toolkit/components/feeds/public/nsIFeedContainer.idl index e6d6719d53b..63734be9043 100644 --- a/toolkit/components/feeds/public/nsIFeedContainer.idl +++ b/toolkit/components/feeds/public/nsIFeedContainer.idl @@ -37,16 +37,17 @@ #include "nsISupports.idl" interface nsIURI; -interface nsIPropertyBag2; +interface nsIWritablePropertyBag2; interface nsIArray; +interface nsIFeedTextConstruct; /** * A shared base for feeds and items, which are pretty similar, * but they have some divergent attributes and require * different convenience methods. */ -[scriptable, uuid(b7e7b6b9-a461-4817-9003-3e6b9005945f)] -interface nsIFeedContainer : nsISupports +[scriptable, uuid(56877da5-598b-41dd-bf3e-72fe713c7820)] +interface nsIFeedContainer : nsISupports { /** * Many feeds contain an ID distinct from their URI, and @@ -69,16 +70,13 @@ interface nsIFeedContainer : nsISupports * Common namespaces are accessed using prefixes, like get("dc:subject");. * See nsIFeedResult::registerExtensionPrefix. */ - attribute nsIPropertyBag2 fields; + attribute nsIWritablePropertyBag2 fields; /** - * Sometimes there's no title, or the title contains markup. - * - * @returns A plain text title string gleaned from whatever - * the publisher has included in the feed. In most - * cases, this is the contents of the . - */ - attribute AString title; + * Sometimes there's no title, or the title contains markup, so take + * care in decoding the attribute. + */ + attribute nsIFeedTextConstruct title; /** * Returns the primary link for the feed or entry. diff --git a/toolkit/components/feeds/public/nsIFeedEntry.idl b/toolkit/components/feeds/public/nsIFeedEntry.idl index abb54d3579f..5c168b100ff 100644 --- a/toolkit/components/feeds/public/nsIFeedEntry.idl +++ b/toolkit/components/feeds/public/nsIFeedEntry.idl @@ -40,9 +40,11 @@ interface nsIArray; /** - * An nsIFeedEntry represents an Atom or RSS entry/item. + * An nsIFeedEntry represents an Atom or RSS entry/item. Summary + * and/or full-text content may be available, but callers will have to + * check both. */ -[scriptable, uuid(ef51d60c-cad1-42ea-9f6c-c1811f733d90)] +[scriptable, uuid(364dc1e5-20fe-4315-bff7-33d2efcf2541)] interface nsIFeedEntry : nsIFeedContainer { /** @@ -54,17 +56,15 @@ interface nsIFeedEntry : nsIFeedContainer { * Uses description, subtitle, summary, content and extensions * to generate a summary. * - * @param stripTags If true, remove HTML markup. */ - AString summary(in boolean stripTags); + attribute nsIFeedTextConstruct summary; /** - * Uses description, summary, content and extensions to provide + * Uses atom:content and content:encoded to provide * a 'full text' view of an entry. * - * @param stripTags If true, remove HTML markup. */ - AString content(in boolean stripTags); + attribute nsIFeedTextConstruct content; /** * Enclosures are podcasts, photocasts, etc. diff --git a/toolkit/components/feeds/public/nsIFeedTextConstruct.idl b/toolkit/components/feeds/public/nsIFeedTextConstruct.idl index 1bb4602b818..5838a7ac691 100644 --- a/toolkit/components/feeds/public/nsIFeedTextConstruct.idl +++ b/toolkit/components/feeds/public/nsIFeedTextConstruct.idl @@ -70,5 +70,12 @@ interface nsIFeedTextConstruct : nsISupports * The content of the text construct. */ attribute AString text; + + /** + * Returns the text of the text construct, with all markup stripped + * and all entities decoded. If the type attribute's value is "text", + * this function returns the value of the text attribute unchanged. + */ + AString plainText(); }; diff --git a/toolkit/components/feeds/src/FeedProcessor.js b/toolkit/components/feeds/src/FeedProcessor.js index 3b8e161126c..598c14f422a 100644 --- a/toolkit/components/feeds/src/FeedProcessor.js +++ b/toolkit/components/feeds/src/FeedProcessor.js @@ -90,17 +90,6 @@ function isIID(a, iid) { return rv; } -function isIFeedTextConstruct(a) { - var rv = false; - try { - a.QueryInterface(Ci.nsIFeedTextConstruct); - rv = true; - } - catch(e) { - } - return rv; -} - function isIArray(a) { return isIID(a, Ci.nsIArray); } @@ -113,20 +102,6 @@ function stripTags(someHTML) { return someHTML.replace(/<[^>]+>/g,""); } -function plainTextFromTextConstruct(textConstruct) { - if (textConstruct != null && - isIFeedTextConstruct(textConstruct)) { - var text = textConstruct.text; - if (textConstruct.type != "text") { - text = gUnescapeHTML.unescape(stripTags(text)); - } - return text; - } - - // it was not a textConstruct, just a string - return textConstruct; -} - /** * Searches through an array of links and returns a JS array * of matching property bags. @@ -339,37 +314,21 @@ FeedResult.prototype = { } function Feed() { - this._sub = null; - this._title = null; + this.subtitle = null; + this.title = null; this.items = []; this.link = null; this.id = null; this.baseURI = null; } + Feed.prototype = { - subtitle: function Feed_subtitle(doStripTags) { - if (this._sub == null) - return null; - - if (doStripTags) - return plainTextFromTextConstruct(this._sub); - - if (isIID(this._sub, Ci.nsIFeedTextConstruct)) - return this._sub.text; - - return this._sub; - }, - - get title() { - return plainTextFromTextConstruct(this._title); - }, - searchLists: { - _sub: ["description","dc:description","rss1:description", - "atom03:tagline","atom:subtitle"], + subtitle: ["description","dc:description","rss1:description", + "atom03:tagline","atom:subtitle"], items: ["items","atom03_entries","entries"], id: ["atom:id","rdf:about"], - _title: ["title","rss1:title", "atom03:title","atom:title"], + title: ["title","rss1:title", "atom03:title","atom:title"], link: [["link",strToURI],["rss1:link",strToURI]], categories: ["categories", "dc:subject"], cloud: ["cloud"], @@ -389,6 +348,9 @@ Feed.prototype = { // Assign Atom link if needed if (bagHasKey(this.fields, "links")) this._atomLinksToURI(); + + this._resetBagMembersToRawText([this.searchLists.subtitle, + this.searchLists.title]); }, _atomLinksToURI: function Feed_linkToURI() { @@ -410,7 +372,20 @@ Feed.prototype = { } } }, - + + // reset the bag to raw contents, not text constructs + _resetBagMembersToRawText: function Feed_resetBagMembers(fieldLists) { + for (var i=0; i<fieldLists.length; i++) { + for (var j=0; j<fieldLists[i].length; j++) { + if (bagHasKey(this.fields, fieldLists[i][j])) { + var textConstruct = this.fields.getProperty(fieldLists[i][j]); + this.fields.setPropertyAsAString(fieldLists[i][j], + textConstruct.text); + } + } + } + }, + QueryInterface: function Feed_QI(iid) { if (iid.equals(Ci.nsIFeed) || iid.equals(Ci.nsIFeedContainer) || @@ -421,88 +396,68 @@ Feed.prototype = { } function Entry() { - this._summary = null; - this._content = null; - this._title = null; + this.summary = null; + this.content = null; + this.title = null; this.fields = Cc["@mozilla.org/hash-property-bag;1"]. - createInstance(Ci.nsIWritablePropertyBag2); + createInstance(Ci.nsIWritablePropertyBag2); this.link = null; this.id = null; this.baseURI = null; } - + Entry.prototype = { fields: null, - get title() { - return plainTextFromTextConstruct(this._title); - }, - summary: function Entry_summary(doStripTags) { - if (this._summary == null) - return null; - - if (doStripTags) - return plainTextFromTextConstruct(this._summary); - - if (isIID(this._summary, Ci.nsIFeedTextConstruct)) - return this._summary.text; - - return this._summary; - }, - content: function Entry_content(doStripTags) { - - if (this._content == null) - return null; - - if (doStripTags) - return plainTextFromTextConstruct(this._content); - - if (isIID(this._content, Ci.nsIFeedTextConstruct)) - return this._content.text; - - return this._content; - }, enclosures: null, mediaContent: null, - + searchLists: { - _title: ["title", "rss1:title", "atom03:title", "atom:title"], + title: ["title", "rss1:title", "atom03:title", "atom:title"], link: [["link",strToURI],["rss1:link",strToURI]], id: [["guid", makePropGetter("guid")], "rdf:about", "atom03:id", "atom:id"], - _summary: ["description", "rss1:description", "dc:description", - "atom03:summary", "atom:summary"], - _content: ["content:encoded","atom03:content","atom:content"] + summary: ["description", "rss1:description", "dc:description", + "atom03:summary", "atom:summary"], + content: ["content:encoded","atom03:content","atom:content"] }, - + normalize: function Entry_normalize() { fieldsToObj(this, this.searchLists); - + // Assign Atom link if needed if (bagHasKey(this.fields, "links")) this._atomLinksToURI(); - + // The link might be a guid w/ permalink=true if (!this.link && bagHasKey(this.fields, "guid")) { var guid = this.fields.getProperty("guid"); - if (bagHasKey(guid, "isPermaLink")) { - var isPermaLink = new Boolean(guid.getProperty("isPermaLink")); - if (isPermaLink) - this.link = strToURI(guid.getProperty("guid")); - } + var isPermaLink = true; + + if (bagHasKey(guid, "isPermaLink")) + isPermaLink = new Boolean(guid.getProperty("isPermaLink")); + + if (guid && isPermaLink) + this.link = strToURI(guid.getProperty("guid")); } - }, + this._resetBagMembersToRawText([this.searchLists.content, + this.searchLists.summary, + this.searchLists.title]); + }, + QueryInterface: function(iid) { if (iid.equals(Ci.nsIFeedEntry) || iid.equals(Ci.nsIFeedContainer) || iid.equals(Ci.nsISupports)) return this; - + throw Cr.NS_ERROR_NOINTERFACE; } } Entry.prototype._atomLinksToURI = Feed.prototype._atomLinksToURI; +Entry.prototype._resetBagMembersToRawText = + Feed.prototype._resetBagMembersToRawText; // TextConstruct represents and element that could contain (X)HTML function TextConstruct() { @@ -513,6 +468,13 @@ function TextConstruct() { } TextConstruct.prototype = { + plainText: function TC_plainText() { + if (this.type != "text") { + return gUnescapeHTML.unescape(stripTags(this.text)); + } + return this.text; + }, + QueryInterface: function(iid) { if (iid.equals(Ci.nsIFeedTextConstruct) || iid.equals(Ci.nsISupports)) @@ -875,7 +837,10 @@ function FeedProcessor() { "atom:subtitle":"text", "description":"html", "rss1:description":"html", + "dc:description":"html", "content:encoded":"html", + "title":"text", + "rss1:title":"text", "atom03:title":"text", "atom03:tagline":"text", "atom03:summary":"text", @@ -1374,9 +1339,8 @@ FeedProcessor.prototype = { // But, it could be something containing HTML. If so, // we need to know about that. - if (this._textConstructs[propName] != null && - (this._result.version.indexOf("rss") == -1 || - this._handlerStack[this._depth].containerClass != null)) { + if (this._textConstructs[propName] != null && + this._handlerStack[this._depth].containerClass !== null) { var newProp = Cc[TEXTCONSTRUCT_CONTRACTID]. createInstance(Ci.nsIFeedTextConstruct); newProp.text = chars; @@ -1398,6 +1362,12 @@ FeedProcessor.prototype = { } } + // If it's rss feed-level description, it's not supposed to have html + if (this._result.version.indexOf("rss") >= 0 && + this._handlerStack[this._depth].containerClass != ENTRY_CONTRACTID) { + type = "text"; + } + newProp.type = type; container.setPropertyAsInterface(propName, newProp); } diff --git a/toolkit/components/feeds/test/test.js b/toolkit/components/feeds/test/test.js index 9f7cfacf7ba..e2821cb38eb 100644 --- a/toolkit/components/feeds/test/test.js +++ b/toolkit/components/feeds/test/test.js @@ -55,7 +55,7 @@ TestListener.prototype = { var feed = result.doc; // QI to something (isIID(feed, Components.interfaces.nsIFeed)); - try { + try { if(!eval(testcase.expect)){ print(testcase.path + ": \n"); print("FAILED! Test was: \"" + testcase.desc + "\" |\n" + testcase.expect + '|\n'); @@ -64,8 +64,10 @@ TestListener.prototype = { } } catch(e) { + print(testcase.path + ": \n"); print("FAILED! Test was: " + testcase.expect + "\nex: " + e.message + "\n"); } + ran += 1; } } @@ -74,7 +76,6 @@ var startDate = new Date(); for(var i=0; i<tests.length; i++){ var testcase = tests[i]; - var uri; if (testcase.base == null) uri = ioService.newURI('http://example.org/'+testcase.path, null,null); @@ -87,7 +88,6 @@ for(var i=0; i<tests.length; i++){ .createInstance(Components.interfaces.nsIFileInputStream); var listener = new TestListener(); try{ - //print('Start: ' + testcase.path); stream.init(testcase.file, 0x01, 0444, 0); parser.listener = listener; parser.parseFromStream(stream, uri); diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_content.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_content.xml index 9c1b7e2028a..6bb9b210f52 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/entry_content.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/entry_content.xml @@ -2,7 +2,7 @@ <!-- Description: atom entry summary works -Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content(false) == "test content"; +Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content.plainText() == "test content"; --> <feed xmlns="http://www.w3.org/2005/Atom" @@ -32,4 +32,4 @@ Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content <content>test content</content> </entry> -</feed> \ No newline at end of file +</feed> diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_content_encoded.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_content_encoded.xml index 0ce4f4222c4..df09317f7ef 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/entry_content_encoded.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/entry_content_encoded.xml @@ -2,7 +2,7 @@ <!-- Description: atom entry content:encoded and xhtml works -Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content(true); content == "should appear"; +Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content.plainText(); content == "should appear"; --> <feed xmlns="http://www.w3.org/2005/Atom" @@ -40,4 +40,4 @@ Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeed </content:encoded> </entry> -</feed> \ No newline at end of file +</feed> diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_content_html.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_content_html.xml index 9e51af583ec..08974c35f0f 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/entry_content_html.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/entry_content_html.xml @@ -2,7 +2,7 @@ <!-- Description: atom entry content html works -Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content(true); content == "test content"; +Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content.plainText(); content == "test content"; --> <feed xmlns="http://www.w3.org/2005/Atom" @@ -32,4 +32,4 @@ Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeed <content type="html"><b>test</b> content</content> </entry> -</feed> \ No newline at end of file +</feed> diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml.xml index 5d1f237c1bb..dea4902bb65 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml.xml @@ -2,7 +2,7 @@ <!-- Description: atom entry content xhtml works -Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content(true); content == "test content"; +Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content.plainText() == "test content"; --> <feed xmlns="http://www.w3.org/2005/Atom" @@ -36,4 +36,4 @@ Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeed </content> </entry> -</feed> \ No newline at end of file +</feed> diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml_with_markup.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml_with_markup.xml index 7b94ff6e184..8cadef75e11 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml_with_markup.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml_with_markup.xml @@ -2,7 +2,7 @@ <!-- Description: atom entry content xhtml works -Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content(false); content == "<b>test</b> content"; +Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content.text; content == "<b>test</b> content"; --> <feed xmlns="http://www.w3.org/2005/Atom" @@ -36,4 +36,4 @@ Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeed </content> </entry> -</feed> \ No newline at end of file +</feed> diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_html_cdata.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_html_cdata.xml index fa32f3dac8e..38a31ca104c 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/entry_html_cdata.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/entry_html_cdata.xml @@ -2,7 +2,7 @@ <!-- Description: HTML title w/ CDATA -Expect: var title = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).title; title == "<title>"; +Expect: var title = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).title.plainText(); title == "<title>"; --> <feed xmlns="http://www.w3.org/2005/Atom"> diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_parent.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_parent.xml index f9cc28cbe8b..e69de29bb2d 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/entry_parent.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/entry_parent.xml @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- - -Description: atom feed and entry with random attributes works -Expect: var parent = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).parent; parent.title == "hmm"; - ---> -<feed xmlns="http://www.w3.org/2005/Atom" - xmlns:foo="http://www.example.org" - foo:quux="quuux"> - - <title>hmm - - - hmm@example.com - foo - - Hmm - - bar@example.com - foo - - -
test rights
-
- - - - - - test - - - - \ No newline at end of file diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_summary.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_summary.xml index cf597fe6988..b245cb3808c 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/entry_summary.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/entry_summary.xml @@ -2,7 +2,7 @@ - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_title.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_title.xml index 2567f7661ad..c118e74727f 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/entry_title.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/entry_title.xml @@ -2,7 +2,7 @@ - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_title_normalized.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_title_normalized.xml index 57dd70c0364..19e2ac1a6f8 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/entry_title_normalized.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/entry_title_normalized.xml @@ -2,7 +2,7 @@ - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_w_content_encoded.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_w_content_encoded.xml index 9f7e73af017..58f94c6c1bd 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/entry_w_content_encoded.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/entry_w_content_encoded.xml @@ -2,7 +2,7 @@ - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_random_attributes_on_feed_and_entry.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_random_attributes_on_feed_and_entry.xml index d68c6273ded..a4c5633e27f 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/feed_random_attributes_on_feed_and_entry.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/feed_random_attributes_on_feed_and_entry.xml @@ -2,7 +2,7 @@ - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_subtitle.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_subtitle.xml index 268b38dd280..096061399e7 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/feed_subtitle.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/feed_subtitle.xml @@ -2,11 +2,11 @@
test subtitle
-
\ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_tantek_title.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_tantek_title.xml index 7ce4a468a6c..cba9a4918f9 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/feed_tantek_title.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/feed_tantek_title.xml @@ -1,7 +1,7 @@ @@ -43,4 +43,4 @@ Expect: feed.title == "Tantek's Updates" - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_title.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_title.xml index 25eca2c3ce2..29413969a03 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/feed_title.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/feed_title.xml @@ -2,9 +2,9 @@ test title - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_title_full_feed.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_title_full_feed.xml index 46fab7bc91a..cef3f84a3b3 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/feed_title_full_feed.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/feed_title_full_feed.xml @@ -1,7 +1,7 @@ <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div> - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_title_xhtml_entities.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_title_xhtml_entities.xml index 808466fd18b..aaf982acfa5 100644 --- a/toolkit/components/feeds/test/xml/rfc4287/feed_title_xhtml_entities.xml +++ b/toolkit/components/feeds/test/xml/rfc4287/feed_title_xhtml_entities.xml @@ -2,7 +2,7 @@ @@ -11,4 +11,4 @@ Expect: feed.subtitle(false) == '"test" & 'title' & "test" & 'title' & <ok> - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss1/feed_bogus_title.xml b/toolkit/components/feeds/test/xml/rss1/feed_bogus_title.xml index ecb7f445b62..a28952495b5 100644 --- a/toolkit/components/feeds/test/xml/rss1/feed_bogus_title.xml +++ b/toolkit/components/feeds/test/xml/rss1/feed_bogus_title.xml @@ -2,7 +2,7 @@ XML: A Disruptive Technology - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss1/feed_description_normalized.xml b/toolkit/components/feeds/test/xml/rss1/feed_description_normalized.xml index 6b967ac5dde..44154b9f177 100644 --- a/toolkit/components/feeds/test/xml/rss1/feed_description_normalized.xml +++ b/toolkit/components/feeds/test/xml/rss1/feed_description_normalized.xml @@ -2,7 +2,7 @@ http://xml.com/pub a description - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc.xml b/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc.xml index 297595adfc0..4e5b1637a32 100644 --- a/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc.xml +++ b/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc.xml @@ -2,7 +2,7 @@ another description a description - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc_only.xml b/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc_only.xml index bb6f92025f3..fa1ecd59ad0 100644 --- a/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc_only.xml +++ b/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc_only.xml @@ -2,7 +2,7 @@ http://xml.com/pub another description - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss1/feed_title_normalized.xml b/toolkit/components/feeds/test/xml/rss1/feed_title_normalized.xml index 9ffe93946a8..5bd6ccefd03 100644 --- a/toolkit/components/feeds/test/xml/rss1/feed_title_normalized.xml +++ b/toolkit/components/feeds/test/xml/rss1/feed_title_normalized.xml @@ -2,7 +2,7 @@ Test - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss1/item_dc_description_normalized.xml b/toolkit/components/feeds/test/xml/rss1/item_dc_description_normalized.xml index f2d977d3a07..d57477a9973 100644 --- a/toolkit/components/feeds/test/xml/rss1/item_dc_description_normalized.xml +++ b/toolkit/components/feeds/test/xml/rss1/item_dc_description_normalized.xml @@ -2,7 +2,7 @@ XML: A Disruptive Technology - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss1/item_description.xml b/toolkit/components/feeds/test/xml/rss1/item_description.xml index f06bf41a9fc..db4a0137ffd 100644 --- a/toolkit/components/feeds/test/xml/rss1/item_description.xml +++ b/toolkit/components/feeds/test/xml/rss1/item_description.xml @@ -2,7 +2,7 @@ - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss1/item_title_normalized.xml b/toolkit/components/feeds/test/xml/rss1/item_title_normalized.xml index 54d2e5b59d9..a9270982f36 100644 --- a/toolkit/components/feeds/test/xml/rss1/item_title_normalized.xml +++ b/toolkit/components/feeds/test/xml/rss1/item_title_normalized.xml @@ -2,7 +2,7 @@ - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/feed_subtitle.xml b/toolkit/components/feeds/test/xml/rss2/feed_subtitle.xml index 15d99a0005a..0b19a28010a 100644 --- a/toolkit/components/feeds/test/xml/rss2/feed_subtitle.xml +++ b/toolkit/components/feeds/test/xml/rss2/feed_subtitle.xml @@ -2,11 +2,11 @@ test - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/feed_subtitle_html.xml b/toolkit/components/feeds/test/xml/rss2/feed_subtitle_html.xml index 75f89b4d640..6fdfd23fb38 100644 --- a/toolkit/components/feeds/test/xml/rss2/feed_subtitle_html.xml +++ b/toolkit/components/feeds/test/xml/rss2/feed_subtitle_html.xml @@ -2,11 +2,11 @@ test]]> - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/feed_subtitle_markup_stripped.xml b/toolkit/components/feeds/test/xml/rss2/feed_subtitle_markup_stripped.xml index 1808f281bbd..b99a499ad47 100644 --- a/toolkit/components/feeds/test/xml/rss2/feed_subtitle_markup_stripped.xml +++ b/toolkit/components/feeds/test/xml/rss2/feed_subtitle_markup_stripped.xml @@ -2,11 +2,11 @@ test]]> - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/feed_title.xml b/toolkit/components/feeds/test/xml/rss2/feed_title.xml index 66f2f00ba29..c677091c430 100644 --- a/toolkit/components/feeds/test/xml/rss2/feed_title.xml +++ b/toolkit/components/feeds/test/xml/rss2/feed_title.xml @@ -2,11 +2,11 @@ test title - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/feed_title_cdata_mixed.xml b/toolkit/components/feeds/test/xml/rss2/feed_title_cdata_mixed.xml index e8febc18460..f47917c6168 100644 --- a/toolkit/components/feeds/test/xml/rss2/feed_title_cdata_mixed.xml +++ b/toolkit/components/feeds/test/xml/rss2/feed_title_cdata_mixed.xml @@ -2,11 +2,11 @@ test t<![CDATA[it]]>le - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/feed_title_nesting.xml b/toolkit/components/feeds/test/xml/rss2/feed_title_nesting.xml index 30b107d5470..5252a5bf42c 100644 --- a/toolkit/components/feeds/test/xml/rss2/feed_title_nesting.xml +++ b/toolkit/components/feeds/test/xml/rss2/feed_title_nesting.xml @@ -2,7 +2,7 @@ @@ -10,4 +10,4 @@ Expect: feed.title == 'test title' test title bogus title - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/item_content_encoded.xml b/toolkit/components/feeds/test/xml/rss2/item_content_encoded.xml index de7a1c9d371..6611375b67d 100644 --- a/toolkit/components/feeds/test/xml/rss2/item_content_encoded.xml +++ b/toolkit/components/feeds/test/xml/rss2/item_content_encoded.xml @@ -2,7 +2,7 @@ diff --git a/toolkit/components/feeds/test/xml/rss2/item_description.xml b/toolkit/components/feeds/test/xml/rss2/item_description.xml index c553730e460..7416d48e6e3 100644 --- a/toolkit/components/feeds/test/xml/rss2/item_description.xml +++ b/toolkit/components/feeds/test/xml/rss2/item_description.xml @@ -2,7 +2,7 @@ @@ -15,4 +15,4 @@ Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary I'm headed for France. I wasn't gonna go this year, but then last week <a href="http://www.imdb.com/title/tt0086525/">Valley Girl</a> came out and I said to myself, Joe Bob, you gotta get out of the country for a while. - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/item_description_2.xml b/toolkit/components/feeds/test/xml/rss2/item_description_2.xml index ce2cd9a05ad..427726868f6 100644 --- a/toolkit/components/feeds/test/xml/rss2/item_description_2.xml +++ b/toolkit/components/feeds/test/xml/rss2/item_description_2.xml @@ -2,7 +2,7 @@ @@ -18,4 +18,4 @@ Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).summary I'm headed for France. I wasn't gonna go this year, but then last week <a href="http://www.imdb.com/title/tt0086525/">Valley Girl</a> came out and I said to myself, Joe Bob, you gotta get out of the country for a while. - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/item_description_cdata.xml b/toolkit/components/feeds/test/xml/rss2/item_description_cdata.xml index 6f50325fb52..ef3926f87e2 100644 --- a/toolkit/components/feeds/test/xml/rss2/item_description_cdata.xml +++ b/toolkit/components/feeds/test/xml/rss2/item_description_cdata.xml @@ -2,7 +2,7 @@ @@ -17,4 +17,4 @@ Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary Valley Girl came out and I said to myself, Joe Bob, you gotta get out of the country for a while.]]> - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/item_description_decode_entities.xml b/toolkit/components/feeds/test/xml/rss2/item_description_decode_entities.xml index 43927bc3094..e259354dcbb 100644 --- a/toolkit/components/feeds/test/xml/rss2/item_description_decode_entities.xml +++ b/toolkit/components/feeds/test/xml/rss2/item_description_decode_entities.xml @@ -2,7 +2,7 @@ @@ -18,4 +18,4 @@ Expect: var summary = feed.items.queryElementAt(0, Components.interfaces.nsIFeed - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/item_description_normalized.xml b/toolkit/components/feeds/test/xml/rss2/item_description_normalized.xml index 4c81f907281..9819deb36ff 100644 --- a/toolkit/components/feeds/test/xml/rss2/item_description_normalized.xml +++ b/toolkit/components/feeds/test/xml/rss2/item_description_normalized.xml @@ -2,7 +2,7 @@ @@ -15,4 +15,4 @@ Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary I'm headed for France. I wasn't gonna go this year, but then last week <a href="http://www.imdb.com/title/tt0086525/">Valley Girl</a> came out and I said to myself, Joe Bob, you gotta get out of the country for a while. - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/item_description_normalized_nohtml.xml b/toolkit/components/feeds/test/xml/rss2/item_description_normalized_nohtml.xml index 419bfe91abf..0a34a008d9a 100644 --- a/toolkit/components/feeds/test/xml/rss2/item_description_normalized_nohtml.xml +++ b/toolkit/components/feeds/test/xml/rss2/item_description_normalized_nohtml.xml @@ -2,7 +2,7 @@ @@ -15,4 +15,4 @@ Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary I'm headed for France. I wasn't gonna go this year, but then last week <a href="http://www.imdb.com/title/tt0086525/">Valley Girl</a> came out and I said to myself, Joe Bob, you gotta get out of the country for a while. - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/item_plain_desc.xml b/toolkit/components/feeds/test/xml/rss2/item_plain_desc.xml index 61ecf47a236..ffb4226f12c 100644 --- a/toolkit/components/feeds/test/xml/rss2/item_plain_desc.xml +++ b/toolkit/components/feeds/test/xml/rss2/item_plain_desc.xml @@ -2,7 +2,7 @@ @@ -16,4 +16,4 @@ Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary bar I'm headed for France. I wasn't gonna go this year, but then last week "Valley Girl" came out and I said to myself, Joe Bob, you gotta get out of the country for a while. - \ No newline at end of file + diff --git a/toolkit/components/feeds/test/xml/rss2/item_title_normalized.xml b/toolkit/components/feeds/test/xml/rss2/item_title_normalized.xml index f25f5cb06eb..51de0f7e230 100644 --- a/toolkit/components/feeds/test/xml/rss2/item_title_normalized.xml +++ b/toolkit/components/feeds/test/xml/rss2/item_title_normalized.xml @@ -2,7 +2,7 @@ diff --git a/toolkit/components/feeds/test/xml/rss2/items_2_titles.xml b/toolkit/components/feeds/test/xml/rss2/items_2_titles.xml index 87563e59ded..3a0d1eb67b6 100644 --- a/toolkit/components/feeds/test/xml/rss2/items_2_titles.xml +++ b/toolkit/components/feeds/test/xml/rss2/items_2_titles.xml @@ -2,7 +2,7 @@