r103366 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103365‎ | r103366 | r103367 >
Date:19:55, 16 November 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
bugfix (javascript crashes in lingo-produced html)
Modified paths:
  • /trunk/extensions/Lingo/LingoParser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Lingo/LingoParser.php
@@ -252,16 +252,8 @@
253253 }
254254
255255 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() );
266258 }
267259
268260 wfProfileOut( __METHOD__ );

Status & tagging log