aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/SelfContained.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/SelfContained.hs')
-rw-r--r--src/Text/Pandoc/SelfContained.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/SelfContained.hs b/src/Text/Pandoc/SelfContained.hs
index 9332a3fa0..a80ab0c63 100644
--- a/src/Text/Pandoc/SelfContained.hs
+++ b/src/Text/Pandoc/SelfContained.hs
@@ -121,8 +121,12 @@ cssURLs userdata d orig =
let url = toString
$ case B.take 1 u of
"\"" -> B.takeWhile (/='"') $ B.drop 1 u
+ "'" -> B.takeWhile (/='\'') $ B.drop 1 u
_ -> u
- (raw, mime) <- getRaw userdata "" (d </> url)
+ let url' = if isAbsoluteURI url
+ then url
+ else d </> url
+ (raw, mime) <- getRaw userdata "" url'
rest <- cssURLs userdata d v
let enc = "data:" `B.append` fromString mime `B.append`
";base64," `B.append` (encode raw)