// if they didn't want any output except (probably) the parse tree,
// then don't bother actually fully expanding it
if ( $prop || $params['prop'] === null ) {
+ $wgParser->startExternalParse( $title_obj, $options, OT_PREPROCESS );
$frame = $wgParser->getPreprocessor()->newFrame();
$wikitext = $wgParser->preprocess( $params['text'], $title_obj, $options, null, $frame );
if ( $params['prop'] === null ) {
* @return string
*/
protected function escapeLikeInternal( $s ) {
- $s = str_replace( '\\', '\\\\', $s );
- $s = $this->strencode( $s );
- $s = str_replace( array( '%', '_' ), array( '\%', '\_' ), $s );
-
- return $s;
+ return addcslashes( $s, '\%_' );
}
/**
}
}
- return " LIKE '" . $s . "' ";
+ return " LIKE {$this->addQuotes( $s )} ";
}
/**