mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 13:32:27 +01:00
use FF2 urlSecurityCheck so that :pageinfo lists feeds properly
This commit is contained in:
@@ -459,9 +459,9 @@ vimperator.Buffer = function () //{{{
|
|||||||
"application/rdf+xml": "XML"
|
"application/rdf+xml": "XML"
|
||||||
};
|
};
|
||||||
|
|
||||||
function isValidFeed(data, principal, isFeed)
|
function isValidFeed(data, isFeed)
|
||||||
{
|
{
|
||||||
if (!data || !principal)
|
if (!data)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!isFeed)
|
if (!isFeed)
|
||||||
@@ -483,8 +483,8 @@ vimperator.Buffer = function () //{{{
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
urlSecurityCheck(data.href, principal,
|
urlSecurityCheck(data.href, getBrowser().currentURI.spec,
|
||||||
Components.interfaces.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL);
|
Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT_OR_DATA);
|
||||||
}
|
}
|
||||||
catch (ex)
|
catch (ex)
|
||||||
{
|
{
|
||||||
@@ -572,7 +572,7 @@ vimperator.Buffer = function () //{{{
|
|||||||
if (rels.feed || (link.type && rels.alternate && !rels.stylesheet))
|
if (rels.feed || (link.type && rels.alternate && !rels.stylesheet))
|
||||||
{
|
{
|
||||||
var feed = { title: link.title, href: link.href, type: link.type || "" };
|
var feed = { title: link.title, href: link.href, type: link.type || "" };
|
||||||
if (isValidFeed(feed, window.content.document.nodePrincipal, rels.feed))
|
if (isValidFeed(feed, rels.feed))
|
||||||
{
|
{
|
||||||
var type = feedTypes[feed.type] || feedTypes["application/rss+xml"];
|
var type = feedTypes[feed.type] || feedTypes["application/rss+xml"];
|
||||||
pageFeeds.push([feed.title, vimperator.util.highlightURL(feed.href, true) + " <span style='color: gray;'>(" + type + ")</span>"]);
|
pageFeeds.push([feed.title, vimperator.util.highlightURL(feed.href, true) + " <span style='color: gray;'>(" + type + ")</span>"]);
|
||||||
|
|||||||
Reference in New Issue
Block a user