Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php |
— | — | @@ -282,14 +282,16 @@ |
283 | 283 | */ |
284 | 284 | function cmpCallback( $a, $b, $operator ) { |
285 | 285 | $b = html_entity_decode( $b, ENT_QUOTES ); |
286 | | - $bre = preg_quote( $b, '|' ); |
| 286 | + $bre = str_replace( '/', '\/', $b ); |
| 287 | + $bre = str_replace( '(', '\(', $bre ); |
| 288 | + $bre = str_replace( ')', '\)', $bre ); |
287 | 289 | switch ( $operator ) { |
288 | 290 | case '=': |
289 | | - $cond = preg_match( "|$bre|i", $a ); |
| 291 | + $cond = preg_match( "/$bre/i", $a ); |
290 | 292 | break; |
291 | 293 | |
292 | 294 | case '!=': |
293 | | - $cond = !preg_match( "|$bre|i", $a ); |
| 295 | + $cond = !preg_match( "/$bre/i", $a ); |
294 | 296 | break; |
295 | 297 | |
296 | 298 | default: |