[v3.4] #940 fix custom prompt

resolves #940 on `release-v3.4`
Whoops, it's to escape carriage returns for strings, I'll take them out...