--- freelinking/freelinking.module	Sat Feb 17 15:47:39 2007
+++ freelinking/freelinking.module	Thu May 24 19:37:00 2007
@@ -271,6 +271,8 @@
          $freelink = substr($freelink, 0, $barpos);
          $phrase = substr($phrase, $barpos + 1);
       }
+      $phrase = decode_entities($phrase);
+      $freelink = decode_entities($freelink);
       if (preg_match('/^(http|mailto|https|ftp):/', $freelink)) {
          $replacement = '<a class="freelinking external" href="' . $freelink . '">' . $phrase . '</a>';
       }
@@ -281,6 +283,7 @@
 
     else if ($allowcamelcase) { // it's a CamelCase, expressions are a bit simpler
       $pattern = '/\b' . $wikiword . '\b(?![^<]*>)/';
+      $wikiword = decode_entities($wikiword);
       $phrase = $wikiword; // consistency for the db
       $freelink = $wikiword; // also for the db
       $replacement = l($wikiword, 'freelinking/' . urlencode($wikiword));
