Unfortunately, that doesn’t help – that just shows what has already been noted by the OP. I already believe the output as stated – but as I said in my response, my tests do not reproduce the issue, which makes it impossible to pin down specifically to the plugin. That’s not saying it’s not a change in the plugin that is needed, but that without being able to reproduce the issue you’re having, I have zero clue on the exact cause – only guesses – and there are several WP core functions and filters in there that mean it could be something in another plugin, custom code snippet, theme, or any number of things. Or, it might be as simple as using esc_url_raw()
instead of esc_url()
Make the change noted (last line of my previous response) and compare the outcome. That’s the info that I need to make any forward progress on this.
Also, all that being said, it doesn’t make a whole lot of sense why it’s only between the second/third query args and not between the first/second. It makes me wonder what’s coming back from get_password_reset_key()
(the WP function that generates the key) and what’s in $user->user_login
(also a WP value). So an additional test would be to add the following:
Immediately before line 196:
$query_args = array_map( 'rawurlencode', $query_args );
Add the following immediately before that (not after):
$query_args = array_map( 'trim', $query_args );
That’s a separate test. It needs to be separate from the first one (esc_url vs esc_url_raw)