Support replace on safe strings