Add escapes for PHP single quotes
Silence warnings
Fix undo of paste and find-replace items
Only replace when find is successful.