Fix replacement test
Remove invalid characters when testing new-style keys