bug 251137 - always open javascript and data links in the current tab, r=gavin, a=beltzner

This commit is contained in:
mconnor@steelgryphon.com 2007-12-17 21:31:11 -08:00
parent 768af537d1
commit ae5d2db160

View File

@ -4165,6 +4165,15 @@ function asyncOpenWebPanel(event)
var wrapper = null;
if (linkNode) {
wrapper = linkNode;
// javascript links should be executed in the current browser
if (wrapper.href.substr(0, 11) === "javascript:")
return true;
// data links should be executed in the current browser
if (wrapper.href.substr(0, 5) === "data:")
return true;
if (event.button == 0 && !event.ctrlKey && !event.shiftKey &&
!event.altKey && !event.metaKey) {
// A Web panel's links should target the main content area. Do this
@ -4181,12 +4190,6 @@ function asyncOpenWebPanel(event)
return true;
if (wrapper.getAttribute("onclick"))
return true;
// javascript links should be executed in the current browser
if (wrapper.href.substr(0, 11) === "javascript:")
return true;
// data links should be executed in the current browser
if (wrapper.href.substr(0, 5) === "data:")
return true;
try {
urlSecurityCheck(wrapper.href, wrapper.ownerDocument.nodePrincipal);