Escape tokenizer does not recognize that a quote
character is escaped if too many backslashes precede
To solve this, I've replaced the _lastChar and
_lastLastChar with a running count of immediately
preceding backslashes, and this count is checked when
determining whether or not a quote character is
escaped. If the count is odd, the quote is escaped.
This solved my problem, which concerned binary data
that just happened to contain multiple backslashes
followed by a single quote followed later on by both an
opening and a closing curly brace.
Be warned that I probably wouldn't have noticed if this
patch introduced any new problems causing escape
sequences to be missed, but from my testing, the
tokenizer still appears to recognize escape sequences
The attached patch was made from the 2.0.14
Log in to post a comment.