Index: branches/REL1_13/phase3/includes/api/ApiMain.php |
— | — | @@ -403,7 +403,7 @@ |
404 | 404 | * tell the printer not to escape ampersands so that our links do |
405 | 405 | * not break. */ |
406 | 406 | $printer->setUnescapeAmps ( ( $this->mAction == 'help' || $isError ) |
407 | | - && $this->getParameter('format') == ApiMain::API_DEFAULT_FORMAT ); |
| 407 | + && $printer->getFormat() == 'XML' && $printer->getIsHtml() ); |
408 | 408 | |
409 | 409 | $printer->initPrinter($isError); |
410 | 410 | |
Index: branches/REL1_13/phase3/includes/api/ApiFormatBase.php |
— | — | @@ -70,6 +70,13 @@ |
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
| 74 | + * Get the internal format name |
| 75 | + */ |
| 76 | + public function getFormat() { |
| 77 | + return $this->mFormat; |
| 78 | + } |
| 79 | + |
| 80 | + /** |
74 | 81 | * Specify whether or not ampersands should be escaped to '&' when rendering. This |
75 | 82 | * should only be set to true for the help message when rendered in the default (xmlfm) |
76 | 83 | * format. This is a temporary special-case fix that should be removed once the help |