Bug 373546. URIs in <guid isPermaLink='false'> are recognized as valid links of feed items in the feed reading view. r=mano

This commit is contained in:
sayrer%gmail.com 2007-04-19 04:50:16 +00:00
Родитель 6c92881514
Коммит 160d308896
5 изменённых файлов: 81 добавлений и 1 удалений

Просмотреть файл

@ -481,7 +481,7 @@ Entry.prototype = {
var isPermaLink = true;
if (bagHasKey(guid, "isPermaLink"))
isPermaLink = new Boolean(guid.getProperty("isPermaLink"));
isPermaLink = guid.getProperty("isPermaLink").toLowerCase() != "false";
if (guid && isPermaLink)
this.link = strToURI(guid.getProperty("guid"));

Просмотреть файл

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: item guid should not map to link when isPermaLink=false
Expect: var link = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link; link == null;
-->
<rss version="2.0" >
<channel>
<item>
<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
<title>test</title>
<guid isPermaLink="false">http://www.example.org/</guid>
<category domain="foo">bar</category>
<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
</channel>
</rss>

Просмотреть файл

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: item guid should not map to link when isPermaLink=FaLsE
Expect: var link = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link; link == null;
-->
<rss version="2.0" >
<channel>
<item>
<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
<title>test</title>
<guid isPermaLink="FaLsE">http://www.example.org/</guid>
<category domain="foo">bar</category>
<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
</channel>
</rss>

Просмотреть файл

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: item guid should map to link when isPermaLink=TrUe
Expect: var link = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link; link.spec == "http://www.example.org/";
-->
<rss version="2.0" >
<channel>
<item>
<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
<title>test</title>
<guid isPermaLink="TrUe">http://www.example.org/</guid>
<category domain="foo">bar</category>
<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
</channel>
</rss>

Просмотреть файл

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: item guid should map to link when isPermaLink=meatcake or other unknown values
Expect: var link = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link; link.spec == "http://www.example.org/";
-->
<rss version="2.0" >
<channel>
<item>
<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
<title>test</title>
<guid isPermaLink="meatcake">http://www.example.org/</guid>
<category domain="foo">bar</category>
<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
</channel>
</rss>