r2088 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r2087‎ | r2088 | r2089 >
Date:07:44, 28 November 2003
Author:vibber
Status:old
Tags:
Comment:
Evan's patch for bug 827757: Wikitext not escaped in log entry descriptions
Modified paths:
  • /trunk/phase3/includes/LogPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LogPage.php
@@ -94,6 +94,9 @@
9595 function addEntry( $action, $comment, $textaction = "" )
9696 {
9797 global $wgLang, $wgUser;
 98+
 99+ $comment_esc = wfEscapeWikiText( $comment );
 100+
98101 $this->getContent();
99102
100103 $ut = $wgUser->getName();
@@ -117,7 +120,8 @@
118121 if ( "" == $comment ) {
119122 $inline = "";
120123 } else {
121 - $inline = " <em>({$comment})</em>";
 124+ $inline = " <em>({$comment_esc})</em>";
 125+ # comment gets escaped again, so we use the unescaped version
122126 $this->mComment .= ": {$comment}";
123127 }
124128 $this->mContent = "{$m[1]}<ul><li>{$d} {$ul} {$action}{$inline}</li>\n{$m[2]}";

Status & tagging log