@@ -26,7 +26,7 @@ module Text.Pandoc.Readers.HTML ( readHtml
27import Control.Applicative ((<|>))
27import Control.Applicative ((<|>))
28import Control.Monad (guard, msum, mzero, unless, void)
28import Control.Monad (guard, msum, mzero, unless, void)
29−import Control.Monad.Except (throwError)
29+import Control.Monad.Except (throwError, catchError)
30import Control.Monad.Reader (ask, asks, lift, local, runReaderT)
30import Control.Monad.Reader (ask, asks, lift, local, runReaderT)
31import Data.ByteString.Base64 (encode)
31import Data.ByteString.Base64 (encode)
32import Data.Char (isAlphaNum, isLetter)
32import Data.Char (isAlphaNum, isLetter)
@@ -393,11 +393,17 @@ pIframe = try $ do
393 tag <- pSatisfy (tagOpen (=="iframe") (isJust . lookup "src"))
393 tag <- pSatisfy (tagOpen (=="iframe") (isJust . lookup "src"))
394 pCloses "iframe" <|> eof
394 pCloses "iframe" <|> eof
395 url <- canonicalizeUrl $ fromAttrib "src" tag
395 url <- canonicalizeUrl $ fromAttrib "src" tag
397+ then ignore $ renderTags' [tag, TagClose "iframe"]
396− (bs, _) <- openURL url
399+ (do (bs, _) <- openURL url
397− let inp = UTF8.toText bs
400+ let inp = UTF8.toText bs
398− opts <- readerOpts <$> getState
401+ opts <- readerOpts <$> getState
399− Pandoc _ contents <- readHtml opts inp
402+ Pandoc _ contents <- readHtml opts inp
400− return $ B.divWith ("",["iframe"],[]) $ B.fromList contents
403+ return $ B.divWith ("",["iframe"],[]) $ B.fromList contents)
405+ logMessage $ CouldNotFetchResource url (renderError e)
406+ ignore $ renderTags' [tag, TagClose "iframe"])
402pRawHtmlBlock :: PandocMonad m => TagParser m Blocks
408pRawHtmlBlock :: PandocMonad m => TagParser m Blocks
403pRawHtmlBlock = do
409pRawHtmlBlock = do