Thank you for your help so far.
Unfortunately, the new line in weblogin.inc.php didn’t solve it.
I’ve also noticed that neither the password input nor the email address for forgotten password input is having this problem, just the input for username. That makes this even more confusing to me, since their posting to the same place.
If you’d like I can email you the link to the page if you want to see the bug in action and don’t want to use the other sites I linked previously without permission.
EDIT -- I just noticed that now, after submitting, the XSS " /> is still showing up below the username filed, like in the above screenshot, only now, instead of the username field being empty, it has a single backslash in it. If I press submit again, it has 2, then 4, then 8 etc. Does that help at all?