String replace to remove carriage return and new line

When using String Replace to remove new lines and carriage return with \r \n \nr they are formatted in the code with multiple slashes. This is passed to the str_replace function and the action fails.

Yes you can edit the code directly to fix it but everytime you touch the function it overwrites the edits.

Additionally it would be helpful if you could enter multiple actions such as “\r,\n,\nr” to minimize having to run the str_replace function 3 times.