-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: missing escape special characters #883
fix: missing escape special characters #883
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm testing this change and it is transforming:
XXX report \\10.10.10.128\something$\whatever\yyy\zzz
to
XXX report \\\\\\\\10.10.10.128\\\\something\\$\\\\whatever\\\\yyy\\\\zzz
which ends up applying the following description:
XXX report \\\\10.10.10.128\\something\$\\whatever\\yyy\\zzz
which is not the original one.
After some tests, I think we don't need to escape $ and we should apply something like:
regex_replace('([\\\"])', '\\\\1')
which transform the description to
XXX report \\\\10.10.10.128\\something$\\whatever\\yyy\\zzz
and it will end up applying the origin description:
XXX report \\10.10.10.128\something$\whatever\yyy\zzz
which is the original one.
Ok, I've changed the regex, thanks for the testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I've tested again and it seemed to work but only for . For " symbol it didn't work.
I think the right expression would be:
regex_replace('([\"])', '\1')
Can you test it?
Sorry for late response, but this regex doesn't work and issue with loading yaml happens again. |
This reverts commit 7f732f6.
I've reverted the regex to the proposed by me, due to my previous comment. |
Hi, I've discovered that issue is related only when the files are included by the include_vars module instead of filetree_read, so I will close this PR. |
What does this PR do?
fix #882
How should this be tested?
explained in a bug
Is there a relevant Issue open for this?
resolves #882
Other Relevant info, PRs, etc
N/A