Allow for spaces at end of email address on Subscription Page


had a client try his new mailing list.

He used his mobile phone keyboard to autofill the email addresses. This adds a space at the end of his email address, and the email address is declared invalid :cry: and he complains.

Made this change to index.php at two places:

function compareEmail()
  document.subscribeform.elements["email"].value = document.subscribeform.elements["email"].value.trim();
  document.subscribeform.elements["emailconfirm"].value = document.subscribeform.elements["emailconfirm"].value.trim();
  return (document.subscribeform.elements["email"].value == document.subscribeform.elements["emailconfirm"].value);

Add the two lines with trim.

Works :slight_smile:

Hi @TonyVier, great catch – thanks! Do you feel like submitting your changes as a Pull Request on GitHub?:

That way all your clients (and the wider phpList community) can benefit :slight_smile: