Index: trunk/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 |
Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -445,7 +445,7 @@ |
446 | 446 | * tell the printer not to escape ampersands so that our links do |
447 | 447 | * not break. */ |
448 | 448 | $printer->setUnescapeAmps ( ( $this->mAction == 'help' || $isError ) |
449 | | - && $this->getParameter('format') == ApiMain::API_DEFAULT_FORMAT ); |
| 449 | + && $printer->getFormat() == 'XML' && $printer->getIsHtml() ); |
450 | 450 | |
451 | 451 | $printer->initPrinter($isError); |
452 | 452 | |