Escape before replacing. bugid:112393