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