--- h:\drupal\modules\print\print.module	Thu Mar 30 15:05:08 2006
+++ c:\drupal\modules\print\print.module	Wed Jul 19 12:58:05 2006
@@ -236,13 +236,18 @@   // The 'view' hook can be implemented 
   if (!isset($print_settings['urls']) || !empty($print_settings['urls'])) {
     /* Collect links and display them at the bottom of the page. Code once taken from Kjartan Mannes' project.module  */
     $pattern = "@<a.*?href=([\']?[\"]?)([^\"|^\'|^|^>]*)([^>]*)>(.+?)</a>@ise";
-    $node->body = preg_replace($pattern, "'<u>'.stripslashes('\\4').'</u> ['. print_friendly_urls(stripslashes('\\2')) .']'", $node->body);
-    $urls = print_friendly_urls();
-    if (count($urls)) {
+    preg_match_all ($pattern, $node->body, $urls);
+	  $num = 0;
+	  while (preg_match($pattern , $node->body ,$match)){
+	    $num++;
+	    $text = '$match[4]." <small class=\"footnote\">[ ".$num." ]</small>"';
+	    $node->body = preg_replace($pattern , $text, $node->body, 1);
+	  }
+    if (count($urls[2])) {
       $node->pfp_links = '';
-      $max = count($urls);
+      $max = count($urls[2]);
       for ($i = 0; $i < $max; $i++) {
-        $node->pfp_links .= '['. ($i + 1) .'] '. $urls[$i] ."<br />\n";
+        $node->pfp_links .= '<sup class="footnote">['. ($i + 1) .']</sup> '. url($urls[2][$i],NULL,NULL,TRUE) ."<br />\n";
       }
     }
   }
