Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/url_replace_filter/README.txt,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 README.txt
--- README.txt	14 Aug 2007 03:04:02 -0000	1.1.2.1
+++ README.txt	8 Jul 2008 08:54:13 -0000
@@ -30,13 +30,20 @@
 Original: http://dev.example.com/
 Replacement: %baseurl/
 
-%baseurl is a token for your site's base URL. The above examples assume a site
-%located in the domain's root directory (in which case %baseurl is actually
-%empty).
+The filter recognizes two tokens:
+- %baseurl is a token for your site's base URL, as a site-relative URL.
+  The above examples assume a site located in the domain's root directory
+  (in which case %baseurl is actually empty).
+- %baseurl-absolute is a token for your site's base URL, as an absolute URL.
 
 Like any Drupal filter, the original user-entered content is not altered. The
 filter is only applied (and its result cached) when the node is viewed.
 
+Absolute URLs are longer but can be necessary when nodes can be accessed from
+a non-controlled URL, as is the case when the path appears in an RSS feed. In
+that case a link to a site-relative URL will usually be broken since the
+aggregating site won't have the same base URL as the site on which the original
+node was present.
 
 Installation
 ************
@@ -54,3 +61,16 @@
    replacement URLs in the appropriate fields and save the configuration. More
    empty replacement fields will automatically be added after saving, in case
    you need more fields than provided by default.
+
+Uninstallation
+**************
+
+1. Go to the Administer > Site building > Modules page, and disable the
+   module. It is located in the "Other" group.
+
+2. Click on the Uninstall tab, check the module, and click on "Uninstall".
+
+Note that uninstalling the module will remove all its data from your site.
+If you want to reconfigure it later, you will have to perform installation
+again. If all you want is a temporary removal of the module, you can just
+disable it on the modules page, and nothing will be lost.
\ No newline at end of file
Index: url_replace_filter.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/url_replace_filter/url_replace_filter.module,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 url_replace_filter.module
--- url_replace_filter.module	14 Aug 2007 03:02:53 -0000	1.1.2.2
+++ url_replace_filter.module	8 Jul 2008 08:46:53 -0000
@@ -33,7 +33,14 @@
     if ($setting['original']) {
       $pattern = '!((<a\s[^>]*href)|(<img\s[^>]*src))\s*=\s*"'. preg_quote($setting['original']) .'!iU';
       if (preg_match_all($pattern, $text, $matches)) {
-        $replacement = str_replace('%baseurl', rtrim(base_path(), '/'), $setting['replacement']);
+        global $base_url;
+
+        $base_relative = rtrim(base_path(), '/');
+        $base_absolute = $base_url;
+
+         // Replace the longest match first to avoid greedy matches
+        $replacement = str_replace('%baseurl-absolute', $base_absolute, $setting['replacement']);
+        $replacement = str_replace('%baseurl',          $base_relative, $replacement);
         foreach ($matches[0] as $key => $match) {
           $text = str_replace($match, $matches[1][$key] .'="'. $replacement, $text);
         }

