so, the url sanitize in the if statement (with rtrim) is also out of the aim of the patch proposal, the url should be sanitized at the two ways or at nothing