Dec 9, 2014 at 3:42 PM
Edited Dec 9, 2014 at 4:56 PM
You are right; it identifies the invalid escape sequence. It reaches the following line:
details.Error = string.Format(Resources.ErrInvEscape, segment);
But then it just returns, and doesn't seem to use the error details anywhere.
If I add a line that examines the
property and returns
, it seems to fail as expected:
if (Escapes.TryGetValue(first, out newFirst))
arr[i] = newFirst + s.Substring(1);
arr[i] = HandleSpecialEscape(arr[i], details);
if (!string.IsNullOrEmpty(details.Error)) return false; // <--- ADDED THIS LINE
value = string.Join(string.Empty, arr);
}// if EscapeEnabled
Would you consider this a correct fix?