Index: include.postload.js
===================================================================
--- a/include.postload.js
+++ b/include.postload.js
@@ -355,32 +355,6 @@
   return url;
 }
 
-// Converts relative to absolute URL
-// e.g.: foo.swf on http://example.com/whatever/bar.html
-//  -> http://example.com/whatever/foo.swf
-function relativeToAbsoluteUrl(url)
-{
-  // If URL is already absolute, don't mess with it
-  if (!url || /^[\w\-]+:/i.test(url))
-    return url;
-
-  // Leading / means absolute path
-  // Leading // means network path
-  if (url[0] == '/')
-  {
-    if (url[1] == '/')
-      return document.location.protocol + url;
-    else
-      return document.location.protocol + "//" + document.location.host + url;
-  }
-
-  // Remove filename and add relative URL to it
-  var base = document.baseURI.match(/.+\//);
-  if (!base)
-    return document.baseURI + "/" + url;
-  return base[0] + url;
-}
-
 // This function Copyright (c) 2008 Jeni Tennison, from jquery.uri.js
 // and licensed under the MIT license. See jquery-*.min.js for details.
 function removeDotSegments(u) {
Index: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -119,6 +119,32 @@
   }
 }
 
+// Converts relative to absolute URL
+// e.g.: foo.swf on http://example.com/whatever/bar.html
+//  -> http://example.com/whatever/foo.swf
+function relativeToAbsoluteUrl(url)
+{
+  // If URL is already absolute, don't mess with it
+  if (!url || /^[\w\-]+:/i.test(url))
+    return url;
+
+  // Leading / means absolute path
+  // Leading // means network path
+  if (url[0] == '/')
+  {
+    if (url[1] == '/')
+      return document.location.protocol + url;
+    else
+      return document.location.protocol + "//" + document.location.host + url;
+  }
+
+  // Remove filename and add relative URL to it
+  var base = document.baseURI.match(/.+\//);
+  if (!base)
+    return document.baseURI + "/" + url;
+  return base[0] + url;
+}
+
 function init()
 {
   // Make sure this is really an HTML page, as Chrome runs these scripts on just about everything
Index: safari/ext/content.js
===================================================================
--- a/safari/ext/content.js
+++ b/safari/ext/content.js
@@ -58,11 +58,13 @@
 
   document.addEventListener("beforeload", function(event)
   {
+    var url = relativeToAbsoluteUrl(event.url);
+
     // we don't block non-HTTP requests anyway, so we can bail out
     // without asking the background page. This is even necessary
     // because passing large data (like a photo encoded as data: URL)
     // to the background page, freezes Safari.
-    if (!/^https?:/.test(event.url))
+    if (!/^https?:/.test(url))
       return;
 
     var type;
@@ -95,7 +97,7 @@
     if (!safari.self.tab.canLoad(
       event, {
         category: "webRequest",
-        url: event.url,
+        url: url,
         type: type,
         pageId: documentInfo.pageId,
         frameId: documentInfo.frameId
