I dont know why, but maybe I can help. I at least know why there are three slashes!
Im sure you know that a back slash makes the next character literal.
The best example is a string that looks like this
var = "here is a \"quote\""
you know that you need to have \" like this in a string because otherwise it will interfere with the outer quotes which define the string as a whole. Well for some reason the code is anticipating needing a literal quote and doing this
\\\'
So, The first \ makes the second \ literal. the third \ makes the ' literal. It wants the end result to be \'
Like I said I dont know enough about what your doing to help you solve but at least I can help with explaining that much...
good luck
Brad W.
AZPixels