@@ -425,7 +425,8 @@ uri = try $ do
425425 -- http://en.wikipedia.org/wiki/State_of_emergency_(disambiguation)
426426 -- as a URL, while NOT picking up the closing paren in
427427 -- (http://wikipedia.org). So we include balanced parens in the URL.
428− let isWordChar c = isAlphaNum c || c == '_' || c == '/' || not (isAscii c)
428+ let isWordChar c = isAlphaNum c || c == '_' || c == '/' || c == '+' ||
429+ not (isAscii c)
429430 let wordChar = satisfy isWordChar
430431 let percentEscaped = try $ char '%' >> skipMany1 (satisfy isHexDigit)
431432 let entity = () <$ characterReference
@@ -434,7 +435,8 @@ uri = try $ do
434435 let uriChunk = skipMany1 wordChar
435436 <|> percentEscaped
436437 <|> entity
437− <|> (try $ punct >> lookAhead (satisfy isWordChar) >> return ())
438+ <|> (try $ punct >>
439+ lookAhead (void (satisfy isWordChar) <|> percentEscaped))
438440 str <- snd `fmap` withRaw (skipMany1 ( () <$
439441 (enclosed (char '(') (char ')') uriChunk
440442 <|> enclosed (char '{') (char '}') uriChunk