convertTag media sourceURL t@(TagOpen "link" as) =
  case fromAttrib "href" t of
       []  -> return t
       src -> do
           enc <- getDataURI media sourceURL (fromAttrib "type" t) src
           return $ TagOpen "link" (("href",enc) : [(x,y) | (x,y) <- as, x /= "href"])
convertTag media sourceURL t@(TagOpen "link" as) =
  case fromAttrib "href" t of
       []  -> return t
       src -> do
           enc <- getDataURI media sourceURL (fromAttrib "type" t) src
           return $ TagOpen "link" (("href",enc) : [(x,y) | (x,y) <- as, x /= "href"])
convertTag media sourceURL t@(TagOpen "link" as) =
  case fromAttrib "href" t of
       []  -> return t
       src -> do
           enc <- getDataURI media sourceURL (fromAttrib "type" t) src
           return $ TagOpen "link" (("href",enc) : [(x,y) | (x,y) <- as, x /= "href"])