r59979 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59978‎ | r59979 | r59980 >
Date:22:31, 11 December 2009
Author:yaron
Status:ok
Tags:
Comment:
Replaced raw HTML with Html class functions
Modified paths:
  • /trunk/extensions/TemplateInfo/TemplateInfo.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TemplateInfo/TemplateInfo.hooks.php
@@ -47,8 +47,8 @@
4848 $parser->getOutput()->setProperty( 'templateinfo', $input );
4949 // TODO - a hook should be called here, to allow other
5050 // XML handlers to parse and display this
51 - $text = "<p>The (unhandled) XML definition for this template is:</p>\n";
52 - $text .= "<pre>" . htmlspecialchars( $input, ENT_QUOTES ) . "</pre>";
 51+ $text = Html::element('p', null, "The (unhandled) XML definition for this template is:") . "\n";
 52+ $text .= Html::element('pre', null, $input);
5353 return $text;
5454 }
5555
@@ -59,8 +59,8 @@
6060 } else {
6161 // Store error message in the page_props table
6262 $parser->getOutput()->setProperty( 'templateinfo', $error_msg );
63 - $text = "<p>The (incorrect) XML definition for this template is:</p>\n";
64 - $text .= "<pre>" . htmlspecialchars( $input, ENT_QUOTES ) . "</pre>";
 63+ $text = Html::element('p', null, "The (incorrect) XML definition for this template is:") . "\n";
 64+ $text .= Html::element('pre', null, $input);
6565 }
6666
6767 // return output

Status & tagging log