Ticket #3625: FCKeditor.Sajax.body.php.2.patch
File FCKeditor.Sajax.body.php.2.patch, 1.2 KB (added by , 14 years ago) |
---|
-
FCKeditorSajax.body.php
198 198 * @param String: $term = word to search on. 199 199 * @return String: $results = a \n delimited string contains search results. 200 200 */ 201 function wfSajaxSearchMWSearch( $term) {201 function wfSajaxSearchMWSearch( $term ) { 202 202 global $wgUser, $wgRequest, $wgFCKeditorSearchType; 203 203 204 204 $search = SearchEngine::create(); … … 219 219 $results = ""; 220 220 foreach($textMatches->mResults as $row){ 221 221 $res = split(" ", $row); 222 $results .= wfSajaxReplaceSpecialChars($res[2])."\n"; 222 if($res[0][0] != '#') { 223 $results .= _MWSearchReplaceSpecialChars($res[2])."\n"; 224 } 223 225 } 224 226 return $results; 225 227 } … … 232 234 * @param String: $subject = original string to be cleaned-up 233 235 * @return String: $result = cleaned-up string. 234 236 */ 235 function wfSajaxReplaceSpecialChars($subject){237 function _MWSearchReplaceSpecialChars( $subject ) { 236 238 $result = preg_replace('/_/', ' ', $subject); 237 239 $result = preg_replace('/%../', ' ', $result); 238 240 return $result;