[SP-1212] - Added check to prevent double escape of already escaped stri...

...ngs - Cherry picked from 52c01343ff6defb12aba87e0b7065ab34b1c7d03