]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7861 added proper s() quoting into user image alt text and popup title
authorskodak <skodak>
Mon, 18 Dec 2006 08:08:15 +0000 (08:08 +0000)
committerskodak <skodak>
Mon, 18 Dec 2006 08:08:15 +0000 (08:08 +0000)
lib/weblib.php

index 64b9e8c954e573e7af3820002120eb9c435a0f12..086b39fb7e4c9705dc45564eecf9255210abae3e 100644 (file)
@@ -557,7 +557,7 @@ function link_to_popup_window ($url, $name='popup', $linkname='click here',
         $url = substr($url, strlen($CFG->wwwroot));
     }
 
-    $link = '<a target="'. $name .'" title="'. $title .'" href="'. $CFG->wwwroot . $url .'" '.
+    $link = '<a target="'. $name .'" title="'. s($title) .'" href="'. $CFG->wwwroot . $url .'" '.
            "onclick=\"return openpopup('$url', '$name', '$options', $fullscreen);\">$linkname</a>";
     if ($return) {
         return $link;
@@ -3084,7 +3084,7 @@ function print_user_picture($userid, $courseid, $picture, $size=0, $return=false
         }    
     }
     $output .= "<img class=\"$class\" align=\"middle\" src=\"$src".
-                   " border=\"0\" width=\"$size\" height=\"$size\" alt=\"".$imagealt."\" />";
+                   " border=\"0\" width=\"$size\" height=\"$size\" alt=\"".s($imagealt)."\" />";
     if ($link) {
         $output .= '</a>';
     }