Index: pathologic.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathologic/pathologic.module,v
retrieving revision 1.7.2.9.2.6
diff -u -r1.7.2.9.2.6 pathologic.module
--- pathologic.module	4 Jun 2010 18:47:11 -0000	1.7.2.9.2.6
+++ pathologic.module	5 Jun 2010 11:41:06 -0000
@@ -48,6 +48,31 @@
 }
 
 /**
+ * Implementation of hook_file_url_alter().
+ */
+function pathologic_file_url_alter(&$path) {
+
+  // Build regular expression
+  static $path_regexp;
+  if (!isset($path_regexp)) {
+  
+    $paths_text = trim(variable_get('filter_pathologic_local_paths_1', ''));
+    if ($paths_text === '') {
+      $paths = array();
+    } else {
+      $paths = array_map('trim', explode("\n", $paths_text));
+    }
+    $paths[] = url('<front>', array('absolute' => TRUE));
+    $paths = array_map('_pathologic_escape', array_unique($paths));
+
+    $path_regexp = '(' . implode('|', $paths) . ')';
+  }
+
+  // Process the regular expression
+  $path = preg_replace($path_regexp, '', $path);
+}
+
+/**
  * Pathologic filter callback.
  */
 function _pathologic($text, $format) {

