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

Extend obfuscate_mailto link to include the subject

    XMLWordPrintable

    Details

    • Database:
      Any
    • Testing Instructions:
      Hide

      Test pre-requisites

      • Being a developer and ready to hack!

      Test steps

      1. Open the file user/profile.php (at line 267 on master)
      2. Change the obfuscate_mailto() call to add three new parameters, a bit like this:

      // From
      obfuscate_mailto($user->email, '')
      // To
      obfuscate_mailto($user->email, '', false, 'I love Moodle!', "Just to mention that I love Moodle (and Martin's beard).\nYeah!")

      3. View your profile user/profile.php?id=2
      4. Make sure the link if nicely obfuscated

      • Mailto is not readable
      • The email is not readable
      • The query strings parameters are escaped

      5. Make sure the link works when you click on it

      Show
      Test pre-requisites Being a developer and ready to hack! Test steps 1. Open the file user/profile.php (at line 267 on master) 2. Change the obfuscate_mailto() call to add three new parameters, a bit like this: // From obfuscate_mailto($user->email, '') // To obfuscate_mailto($user->email, '', false, 'I love Moodle!', "Just to mention that I love Moodle (and Martin's beard).\nYeah!") 3. View your profile user/profile.php?id=2 4. Make sure the link if nicely obfuscated Mailto is not readable The email is not readable The query strings parameters are escaped 5. Make sure the link works when you click on it
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-31926-master

      Description

      One of our clients has the course shortname passed as optional parameter to this function to enhance the link when it is clicked on so the subject is filled.

      This would be great improvement to the mailto links

        Attachments

          Activity

            People

            • Votes:
              3 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Dec/12