Index: branches/REL1_14/phase3/includes/api/ApiResult.php |
— | — | @@ -186,6 +186,15 @@ |
187 | 187 | ApiResult :: setElement($data, $name, $value); // Add named element |
188 | 188 | } |
189 | 189 | |
| 190 | + /** |
| 191 | + * Ensure all values in this result are valid UTF-8. |
| 192 | + */ |
| 193 | + public function cleanUpUTF8() |
| 194 | + { |
| 195 | + $data = & $this->getData(); |
| 196 | + array_walk_recursive($data, array('UtfNormal', 'cleanUp')); |
| 197 | + } |
| 198 | + |
190 | 199 | public function execute() { |
191 | 200 | ApiBase :: dieDebug(__METHOD__, 'execute() is not supported on Result object'); |
192 | 201 | } |
Index: branches/REL1_14/phase3/includes/api/ApiMain.php |
— | — | @@ -438,6 +438,7 @@ |
439 | 439 | * Print results using the current printer |
440 | 440 | */ |
441 | 441 | protected function printResult($isError) { |
| 442 | + $this->getResult()->cleanupUTF8(); |
442 | 443 | $printer = $this->mPrinter; |
443 | 444 | $printer->profileIn(); |
444 | 445 | |
Index: branches/REL1_14/phase3/RELEASE-NOTES |
— | — | @@ -18,11 +18,6 @@ |
19 | 19 | Those wishing to use the latest code instead of a branch release can obtain |
20 | 20 | it from source control: http://www.mediawiki.org/wiki/Download_from_SVN |
21 | 21 | |
22 | | -=== API changes in 1.14rc1 === |
23 | | -* (bug 16798) JSON encoding errors for some characters outside the BMP |
24 | | -* (bug 16629) prop=info&inprop=protection lists empty legacy protections |
25 | | - incorrectly |
26 | | - |
27 | 22 | === Configuration changes in 1.14 === |
28 | 23 | |
29 | 24 | * $wgExemptFromUserRobotsControl is an array of namespaces to be exempt from |
— | — | @@ -584,6 +579,10 @@ |
585 | 580 | * (bug 16726) siprop=namespacealiases should also list localized aliases |
586 | 581 | * (bug 16730) Added apprfiltercascade parameter to list=allpages to filter |
587 | 582 | cascade-protected pages |
| 583 | +* (bug 16798) JSON encoding errors for some characters outside the BMP |
| 584 | +* (bug 16629) prop=info&inprop=protection lists empty legacy protections |
| 585 | + incorrectly |
| 586 | +* (bug 15261, 16262) API no longer outputs invalid UTF-8 |
588 | 587 | |
589 | 588 | === Languages updated in 1.14 === |
590 | 589 | |