Index: trunk/phase3/RELEASE-NOTES-1.18 |
— | — | @@ -444,6 +444,8 @@ |
445 | 445 | #REDIRECT [[Foo]] is invalid JS |
446 | 446 | * Tracking categories are no longer shown in footer for special pages |
447 | 447 | * $wgOverrideSiteFeed no longer double escapes urls. |
| 448 | +* The preprocessor no longer fails with a PHP warning about XML_PARSE_HUGE when |
| 449 | + processing complex pages using newer versions of libxml2. |
448 | 450 | |
449 | 451 | === API changes in 1.18 === |
450 | 452 | * BREAKING CHANGE: action=watch now requires POST and token. |
Index: trunk/phase3/includes/parser/Preprocessor_DOM.php |
— | — | @@ -155,7 +155,8 @@ |
156 | 156 | if ( !$result ) { |
157 | 157 | // Try running the XML through UtfNormal to get rid of invalid characters |
158 | 158 | $xml = UtfNormal::cleanUp( $xml ); |
159 | | - $result = $dom->loadXML( $xml ); |
| 159 | + // 1 << 19 == XML_PARSE_HUGE, needed so newer versions of libxml2 don't barf when the XML is >256 levels deep |
| 160 | + $result = $dom->loadXML( $xml, 1 << 19 ); |
160 | 161 | if ( !$result ) { |
161 | 162 | throw new MWException( __METHOD__.' generated invalid XML' ); |
162 | 163 | } |