API: Also prevent double escaping when outputting an error message in xmlfm
authorRoan Kattouw <catrope@users.mediawiki.org>
Tue, 30 Oct 2007 21:55:34 +0000 (21:55 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Tue, 30 Oct 2007 21:55:34 +0000 (21:55 +0000)
includes/api/ApiMain.php

index c1ef461..406d23a 100644 (file)
@@ -325,7 +325,7 @@ class ApiMain extends ApiBase {
                 * tell the printer not to escape ampersands so that our links do
                 * not break. */
                $params = $this->extractRequestParams();
-               $printer->setUnescapeAmps ( $this->mAction == 'help' 
+               $printer->setUnescapeAmps ( ( $this->mAction == 'help' || $isError ) 
                                && $params['format'] == ApiMain::API_DEFAULT_FORMAT );
 
                $printer->initPrinter($isError);