--- a/Allura/allura/lib/markdown_extensions.py
+++ b/Allura/allura/lib/markdown_extensions.py
@@ -122,7 +122,7 @@
             return link
 
     def _expand_link(self, link):
-        reference = self.alinks[link]
+        reference = self.alinks.get(link)
         if not reference:
             return 'notfound'
         else: