Merge "Remove useless test in getParamValue function of mediawiki.util.js"
[lhc/web/wiklou.git] / includes / api / ApiFormatXml.php
index 054784b..ef2c54f 100644 (file)
@@ -201,7 +201,7 @@ class ApiFormatXml extends ApiFormatBase {
                        $this->setWarning( 'Stylesheet should have .xsl extension.' );
                        return;
                }
-               $this->printText( '<?xml-stylesheet href="' . $nt->escapeLocalURL( 'action=raw' ) . '" type="text/xsl" ?>' );
+               $this->printText( '<?xml-stylesheet href="' . htmlspecialchars( $nt->getLocalURL( 'action=raw' ) ) . '" type="text/xsl" ?>' );
        }
 
        public function getAllowedParams() {
@@ -215,7 +215,8 @@ class ApiFormatXml extends ApiFormatBase {
        public function getParamDescription() {
                return array(
                        'xmldoublequote' => 'If specified, double quotes all attributes and content',
-                       'xslt' => 'If specified, adds <xslt> as stylesheet',
+                       'xslt' => 'If specified, adds <xslt> as stylesheet. This should be a wiki page '
+                               . 'in the MediaWiki namespace whose page name ends with ".xsl"',
                        'includexmlnamespace' => 'If specified, adds an XML namespace'
                );
        }