aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Parsing.hs2
-rw-r--r--test/command/4068.md9
2 files changed, 10 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
diff --git a/test/command/4068.md b/test/command/4068.md
new file mode 100644
index 000000000..7b43a7084
--- /dev/null
+++ b/test/command/4068.md
@@ -0,0 +1,9 @@
+```
+pandoc -f mediawiki -t native
+[https://domain.com/script.php?a=1&b=2&c=&d=4 open productname bugs]
+
+[http://domain.com?a=. open productname bugs]
+^D
+[Para [Link ("",[],[]) [Str "open",Space,Str "productname",Space,Str "bugs"] ("https://domain.com/script.php?a=1&b=2&c=&d=4","")]
+,Para [Str "[",Link ("",[],[]) [Str "http://domain.com?a="] ("http://domain.com?a=",""),Str ".",Space,Str "open",Space,Str "productname",Space,Str "bugs]"]]
+```