Smarter replace fnEscape