Index: trunk/extensions/Lingo/LingoParser.php |
— | — | @@ -252,16 +252,8 @@ |
253 | 253 | } |
254 | 254 | |
255 | 255 | if ( $changedDoc ) { |
256 | | - $body = $xpath->query( '/html/body' ); |
257 | | - |
258 | | - if ( $body->length > 0 ) { |
259 | | - $text = ''; |
260 | | - foreach ( $body->item( 0 )->childNodes as $child ) { |
261 | | - $text .= $doc->saveXML( $child ); |
262 | | - } |
263 | | - |
264 | | - $this->loadModules( $parser ); |
265 | | - } |
| 256 | + $this->loadModules( $parser ); |
| 257 | + $text = preg_replace( '%(^.*<body>)|(</body>.*$)%UDs', '', $doc->saveHTML() ); |
266 | 258 | } |
267 | 259 | |
268 | 260 | wfProfileOut( __METHOD__ ); |