Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog ended with '\'.

Patch by Roger Serwy.