-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Bug report: Utils.parseEscapedChars backslash matching #589
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Currently Utils.parseEscapedChars can match up to three backslashes in a replacement, which I think is unintended. As an example problem case,
\\\\\\
unescapes to\\\\
instead of\\\
. The reproduction link below does a round trip with escape, then unescape.Following #582, I think we don't need the leading
(\\)?
andif (a === "\\")
anymore. If there's an escaped backslash, it'll match withb
equal to\
, and whatever comes after will not be affected by the replace operation.To Reproduce
Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0
Expected behavior
The output should be
\\\
.The text was updated successfully, but these errors were encountered: