]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15392: fix output sanitization and put permalink back, in a xhtml-strict complian...
authorscyrma <scyrma>
Fri, 27 Jun 2008 04:02:31 +0000 (04:02 +0000)
committerscyrma <scyrma>
Fri, 27 Jun 2008 04:02:31 +0000 (04:02 +0000)
blog/lib.php

index cfa55e26a9c0eb5b3e1314c42b598438b70e039a..6f1103001f79477b8a438925a67ca6312c6879ca 100755 (executable)
         global $USER, $CFG, $COURSE, $ME, $DB;
 
         $template['body'] = format_text($blogEntry->summary, $blogEntry->format);
-        //$template['title'] = '<a name="'. $blogEntry->subject .'"></a>';
+        $template['title'] = '<a id="'. s($blogEntry->subject) .'"></a>';
         //enclose the title in nolink tags so that moodle formatting doesn't autolink the text
-        $template['title'] = '<span class="nolink">'.$blogEntry->subject.'</span>';
+        $template['title'] .= '<span class="nolink">'. format_string($blogEntry->subject) .'</span>';
         $template['userid'] = $blogEntry->userid;
         $template['author'] = fullname($DB->get_record('user', array('id'=>$blogEntry->userid)));
         $template['lastmod'] = userdate($blogEntry->lastmodified);