use proper escape sequences and hardcoded replacement