Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.8.0
-
None
-
None
Description
We've got a bug with ReplaceText when in replacement value are both the literal dollar signs and backreferences.
Our use case is preparing Mongo queries using the value passed in FlowFile. The replacement looks like this:
{updatedTime: {$ne: $1}}
NiFi 1.7.1 iterates through this line (source) and correctly replaces only "$ne", leaving "$1" untouched. NiFi 1.8.0, on the other hand, uses Matcher (source), which escapes all and every dollar sign if it ever finds the need to escape one, so the backreference is treated as literal replacement, and the query fails.
We have to make a workaround right now by using several ReplaceText processors in a row, but this looks rather ugly. Hoping to see this fixed.
Attachments
Attachments
Issue Links
- duplicates
-
NIFI-3303 escapeJson in ReplaceText
- Open