Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65162

Upload users says email address with apostrophe is invalid

    XMLWordPrintable

    Details

      Description

      When uploading users via csv email addresses with apostrophes (e.g. georgia.o'keeffe@virginia.edu ) show the warning "Invalid email address".

      I have had a look at the strings that are passed to the validate_email function from admin/tool/uploaduser/index.php and it looks like the addresses are getting html encoded before they're validated (e.g. georgia.o'keeffe@virginia.edu ) - I've not been able to track down where this gets encoded.

       

      steps to reproduce:

      1. create a user upload csv where the email column contains a valid address with an apostrophe
      2. upload the csv in Site administration > Users > Accounts > Upload users

      Expected: email address passes validation

      Actual: email address fails validation

       

        Attachments

        1. apostrophe_upload.csv
          0.2 kB
          Gavin Nelson
        2. invalid_email_address.PNG
          65 kB
          Gavin Nelson
        3. test_results.PNG
          35 kB
          José Miguel Moreno
        4. test_users.csv
          0.3 kB
          José Miguel Moreno

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            gavinn Gavin Nelson
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated: