r30120 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r30119‎ | r30120 | r30121 >
Date:13:16, 24 January 2008
Author:catrope
Status:old
Tags:
Comment:
Tweaking r30119: changing txt and dbg's MIME type to text and adding txtfm and dbgfm with HTML-escaped stuff.
Modified paths:
  • /trunk/phase3/includes/api/ApiFormatDbg.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatTxt.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiFormatDbg.php
@@ -38,11 +38,11 @@
3939 }
4040
4141 public function getMimeType() {
42 - return 'text/html';
 42+ return 'text/text';
4343 }
4444
4545 public function execute() {
46 - $this->printText($this->formatHTML(var_export($this->getResultData(), true)));
 46+ $this->printText(var_export($this->getResultData(), true));
4747 }
4848
4949 protected function getDescription() {
Index: trunk/phase3/includes/api/ApiMain.php
@@ -91,7 +91,9 @@
9292 'yamlfm' => 'ApiFormatYaml',
9393 'rawfm' => 'ApiFormatJson',
9494 'txt' => 'ApiFormatTxt',
95 - 'dbg' => 'ApiFormatDbg'
 95+ 'txtfm' => 'ApiFormatTxt',
 96+ 'dbg' => 'ApiFormatDbg',
 97+ 'dbgfm' => 'ApiFormatDbg'
9698 );
9799
98100 private $mPrinter, $mModules, $mModuleNames, $mFormats, $mFormatNames;
Index: trunk/phase3/includes/api/ApiFormatTxt.php
@@ -38,11 +38,11 @@
3939 }
4040
4141 public function getMimeType() {
42 - return 'text/html';
 42+ return 'text/text';
4343 }
4444
4545 public function execute() {
46 - $this->printText($this->formatHTML(print_r($this->getResultData(), true)));
 46+ $this->printText(print_r($this->getResultData(), true));
4747 }
4848
4949 protected function getDescription() {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r30119No need to revert r30078: HTML-formatting the data is enough. Attacks like ap...catrope13:12, 24 January 2008

Status & tagging log