diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-11-14 22:05:47 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-11-14 22:08:14 -0800 |
commit | 508aab0bd555b4ca7632a78957ebb91c758f0a7e (patch) | |
tree | 175d3c204f86d4579107bde273a5a78a59e6fc1f /src/Text/Pandoc | |
parent | 22d69c8916f5cf53c4329c7757d063093cf39928 (diff) | |
download | pandoc-508aab0bd555b4ca7632a78957ebb91c758f0a7e.tar.gz |
Text.Pandoc.Parsing.uri: allow `&` and `=` as word characters.
This fixes a bug where pandoc would stop parsing a URI with an
empty attribute: for example, `&a=&b=` wolud stop at `a`.
(The uri parser tries to guess which punctuation characters
are part of the URI and which might be punctuation after it.)
Closes #4068.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 61d3caf3d..d8418ed11 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -563,7 +563,7 @@ uri = try $ do -- http://en.wikipedia.org/wiki/State_of_emergency_(disambiguation) -- as a URL, while NOT picking up the closing paren in -- (http://wikipedia.org). So we include balanced parens in the URL. - let isWordChar c = isAlphaNum c || c `elem` "#$%*+/@\\_-" + let isWordChar c = isAlphaNum c || c `elem` "#$%*+/@\\_-&=" let wordChar = satisfy isWordChar let percentEscaped = try $ char '%' >> skipMany1 (satisfy isHexDigit) let entity = () <$ characterReference |