API: (bug 18617) Add xml:space="preserve" attribute to relevant tags in XML output...
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 29 Apr 2009 13:12:27 +0000 (13:12 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 29 Apr 2009 13:12:27 +0000 (13:12 +0000)
RELEASE-NOTES
includes/api/ApiFormatXml.php

index ed136a9..015ee30 100644 (file)
@@ -435,6 +435,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 18601) generator=backlinks returns invalid continue parameter
 * (bug 18597) Internal error with empty generator= parameter
 * (bug 16422) Don't display help for format=jsonfm unless specifically requested
+* (bug 18617) Add xml:space="preserve" attribute to relevant tags in XML output
 
 === Languages updated in 1.15 ===
 
index 81bcfa7..b6f726c 100644 (file)
@@ -89,6 +89,11 @@ class ApiFormatXml extends ApiFormatBase {
                                        if ($this->mDoubleQuote)
                                                $subElemContent = $this->doubleQuote($subElemContent);
                                        unset ($elemValue['*']);
+                                       
+                                       // Add xml:space="preserve" to the
+                                       // element so XML parsers will leave
+                                       // whitespace in the content alone
+                                       $elemValue['xml:space'] = 'preserve';
                                } else {
                                        $subElemContent = null;
                                }