Browse files

MDL-38824 Activity completion: Automatic completion quotes not escaped

  • Loading branch information...
1 parent bd11908 commit cfd41befd59802c9b438f8a565ffee292fe84e22 @sammarshallou sammarshallou committed Apr 8, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 course/lib.php
View
7 course/lib.php
@@ -1679,9 +1679,10 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
echo html_writer::end_tag('div');
echo html_writer::end_tag('form');
} else {
- // In auto mode, or when editing, the icon is just an image
- echo "<span class='autocompletion'>";
- echo "<img src='$imgsrc' alt='$imgalt' title='$imgalt' /></span>";
+ // In auto mode, or when editing, the icon is just an image.
+ echo html_writer::tag('span', html_writer::empty_tag('img', array(
+ 'src' => $imgsrc, 'alt' => $imgalt, 'title' => $imgalt)),
+ array('class' => 'autocompletion'));
}
}
}

0 comments on commit cfd41be

Please sign in to comment.