https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114841
Revision: 114841
Author: schuellersa
Date: 2012-04-11 07:52:03 +0000 (Wed, 11 Apr 2012)
Log Message:
-----------
Instead of using the preg_replace use the MW's own XML sanitizer.
Modified Paths:
--------------
trunk/extensions/SolrStore/SolrDoc.php
Modified: trunk/extensions/SolrStore/SolrDoc.php
===================================================================
--- trunk/extensions/SolrStore/SolrDoc.php 2012-04-11 00:43:38 UTC (rev
114840)
+++ trunk/extensions/SolrStore/SolrDoc.php 2012-04-11 07:52:03 UTC (rev
114841)
@@ -24,8 +24,7 @@
* @param $value String: value of the field
*/
public function addField( $name, $value ) {
- $value = preg_replace('/<|>/msu', '',$value);
- $this->output .= '<field name="' . $name . '">' . $value .
'</field>';
+ $this->output .= '<field name="' .
Sanitizer::normalizeCharReferences ( $name ) . '">' .
Sanitizer::normalizeCharReferences ( $value ) . '</field>';
}
/**
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs