Skip to content

Commit

Permalink
MDL-31815 encode dots in confirm url which helps email clients with u…
Browse files Browse the repository at this point in the history
…rl highlighting
  • Loading branch information
skodak committed Mar 10, 2012
1 parent 90ba17e commit 906950a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -4968,7 +4968,9 @@ function send_confirmation_email($user) {

$subject = get_string('emailconfirmationsubject', '', format_string($site->fullname));

$data->link = $CFG->wwwroot .'/login/confirm.php?data='. $user->secret .'/'. urlencode($user->username);
$username = urlencode($user->username);
$username = str_replace('.', '%2E', $username); // prevent problems with trailing dots
$data->link = $CFG->wwwroot .'/login/confirm.php?data='. $user->secret .'/'. $username;
$message = get_string('emailconfirmation', '', $data);
$messagehtml = text_to_html(get_string('emailconfirmation', '', $data), false, false, true);

Expand Down

0 comments on commit 906950a

Please sign in to comment.