r59984 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59983‎ | r59984 | r59985 >
Date:23:32, 11 December 2009
Author:yaron
Status:ok
Tags:
Comment:
Fixed some escaping issues
Modified paths:
  • /trunk/extensions/TemplateInfo/TemplateInfo.classes.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TemplateInfo/TemplateInfo.classes.php
@@ -46,6 +46,7 @@
4747 }
4848
4949 static function tableRowHTML($css_class, $data_type, $value = null) {
 50+ $data_type = htmlspecialchars($data_type);
5051 $content = is_null($value) ? $data_type : "$data_type: " . HTML::element('span', array('class' => 'rowValue'), $value);
5152 $cell = HTML::rawElement('td', array('colspan' => 2), $content);
5253 $text = HTML::rawElement('tr', array('class' => "$css_class"), $cell);
@@ -54,8 +55,8 @@
5556 }
5657
5758 static function tableMessageRowHTML($css_class, $name, $value) {
58 - $cell1 = HTML::rawElement('td', array(), $name);
59 - $cell2 = HTML::rawElement('td', array('class' => 'msg'), $value);
 59+ $cell1 = HTML::element('td', array(), $name);
 60+ $cell2 = HTML::element('td', array('class' => 'msg'), $value);
6061 $text = HTML::rawElement('tr', array('class' => "$css_class"), $cell1 . "\n" . $cell2);
6162 $text .= "\n";
6263 return $text;

Status & tagging log