r78930 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78929‎ | r78930 | r78931 >
Date:22:05, 23 December 2010
Author:yaron
Status:deferred
Tags:
Comment:
Follow-up to r78888 - added "/s" modifier to preg_replace(), to allow for multi-line comments
Modified paths:
  • /trunk/extensions/ExternalData/ED_Utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ExternalData/ED_Utils.php
@@ -209,7 +209,7 @@
210210
211211 // Remove comments from XML - for some reason, xml_parse()
212212 // can't handle them.
213 - $xml = preg_replace( '/<!--.*?-->/', '', $xml );
 213+ $xml = preg_replace( '/<!--.*?-->/s', '', $xml );
214214
215215 $xml_parser = xml_parser_create();
216216 xml_set_element_handler( $xml_parser, array( 'EDUtils', 'startElement' ), array( 'EDUtils', 'endElement' ) );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78888Added removal of comments from XML before parsingyaron14:27, 23 December 2010

Status & tagging log