use urlify more in Html.lhs
[wix.git] / src / Html.lhs
index 5784cb5..a3ff54f 100644 (file)
@@ -183,8 +183,9 @@ instance ToHtml Paragraph where
  toHtml (P t)          = stag "p"  $ toHtml t
 
 
-link ref body = "<a href='"++ref++"'>"++icon++body++"</a>"
+link ref body = "<a href='"++(urlify ref)++"'>"++icon++body++"</a>"
  where
+  urlify = toHtml
   icon = if      ".pdf" `isSuffixOf` ref then "<img "++img++" src='"++pdfIconBase64++"'>&nbsp;"
          else if "mailto:" `isPrefixOf` ref then "<img "++img++" src='"++emailIconBase64++"'>&nbsp;"
          else ""