We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 669c2b8 commit ca4ad3bCopy full SHA for ca4ad3b
src/Text/Pandoc/Readers/HTML.hs
@@ -1222,8 +1222,10 @@ htmlTag f = try $ do
1222
1223
-- | Adjusts a url according to the document's base URL.
1224
canonicalizeUrl :: PandocMonad m => Text -> TagParser m Text
1225
-canonicalizeUrl url = do
1226
- mbBaseHref <- baseHref <$> getState
1227
- return $ case (parseURIReference (T.unpack url), mbBaseHref) of
1228
- (Just rel, Just bs) -> tshow (rel `nonStrictRelativeTo` bs)
1229
- _ -> url
+canonicalizeUrl url
+ | "data:" `T.isPrefixOf` url = return url
+ | otherwise = do
+ mbBaseHref <- baseHref <$> getState
+ return $ case (parseURIReference (T.unpack url), mbBaseHref) of
1230
+ (Just rel, Just bs) -> tshow (rel `nonStrictRelativeTo` bs)
1231
+ _ -> url
0 commit comments