I am using this call to remove carriage returns from a String
input = input.replaceAll("[\r\n]", "");
return input;
But when given this String as input: http://localhost:4200/\n\rhome
I get the following output: http://localhost:4200/\\n\\rhome
Any idea why? And how can I fix this?