From 2cd995f73c421ec7fc2100d4a3efb7a0b5abbb7b Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Thu, 18 Sep 2008 17:21:13 +0000 Subject: [PATCH] Fix for last commit My last commit didn't catch anything but plain : would be allowed. Fixed using a regex from the patch on bug 12757 by Max Semenik. --- Cite_body.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cite_body.php b/Cite_body.php index 77e5e7e5d..e933015a0 100644 --- a/Cite_body.php +++ b/Cite_body.php @@ -155,10 +155,10 @@ class Cite { return $this->error( 'cite_error_ref_numeric_key' ); } - if( strpos( - preg_replace( '#<([^ ]+?).*?>.*?|#', '', $str ), - '' - ) !== false ) { + if( preg_match( + '//', + preg_replace( '#<([^ ]+?).*?>.*?|#', '', $str ) + ) ) { # (bug 6199) This most likely implies that someone left off the # closing tag, which will cause the entire article to be # eaten up until the next . So we bail out early instead.