Index: trunk/extensions/Cite/Cite_body.php |
— | — | @@ -155,10 +155,10 @@ |
156 | 156 | return $this->error( 'cite_error_ref_numeric_key' ); |
157 | 157 | } |
158 | 158 | |
159 | | - if( strpos( |
160 | | - preg_replace( '#<([^ ]+?).*?>.*?</\\1 *>|<!--.*?-->#', '', $str ), |
161 | | - '<ref>' |
162 | | - ) !== false ) { |
| 159 | + if( preg_match( |
| 160 | + '/<ref\b[^<]*?>/', |
| 161 | + preg_replace( '#<([^ ]+?).*?>.*?</\\1 *>|<!--.*?-->#', '', $str ) |
| 162 | + ) ) { |
163 | 163 | # (bug 6199) This most likely implies that someone left off the |
164 | 164 | # closing </ref> tag, which will cause the entire article to be |
165 | 165 | # eaten up until the next <ref>. So we bail out early instead. |