feat: Allow backslash escaping inside double quotes
Examples:
- ?col=in.("Double\"Quote")
- ?col=in.("Back\\slash")
Backslashed chars get passed as is
- ?col=in.("\a\b\c") = ?col=in.(abc)
This commit is contained in:
committed by
Steve Chavez
parent
4a594d5e95
commit
72a28a145d
@@ -207,7 +207,9 @@ pListElement :: Parser Text
|
||||
pListElement = try (pQuotedValue <* notFollowedBy (noneOf ",)")) <|> (toS <$> many (noneOf ",)"))
|
||||
|
||||
pQuotedValue :: Parser Text
|
||||
pQuotedValue = toS <$> (char '"' *> many (noneOf "\"") <* char '"')
|
||||
pQuotedValue = toS <$> (char '"' *> many pCharsOrSlashed <* char '"')
|
||||
where
|
||||
pCharsOrSlashed = noneOf "\\\"" <|> (char '\\' *> anyChar)
|
||||
|
||||
pDelimiter :: Parser Char
|
||||
pDelimiter = char '.' <?> "delimiter (.)"
|
||||
|
||||
Reference in New Issue
Block a user