replaces apostrophes with escape