CVS update: /cowiki/includes/cowiki/class/parse/
[email protected] 27 Jul 2005 20:11:12 -0000
| Newsgroups | gmane.comp.php.cowiki.cvs |
|---|---|
| Message-ID | <[email protected]> |
User: cmarble Date: 2005/07/27 13:11:12 Modified: cowiki/includes/cowiki/class/parse/class.WikiParser.php Log: Er, code|posting|q|rem|pre handling now checking only for, um, code|posting|q|rem|pre handling. Stripped out some crufty regexes, replaced with something more relevant. File Changes: Directory: /cowiki/includes/cowiki/class/parse/ =============================================== File [changed]: class.WikiParser.php Url: http://cowiki.tigris.org/source/browse/cowiki/includes/cowiki/class/parse/class.WikiParser.php?r1=1.57&r2=1.58 Delta lines: +3 -6 ------------------- --- class.WikiParser.php 26 Jul 2005 16:53:10 -0000 1.57 +++ class.WikiParser.php 27 Jul 2005 20:11:09 -0000 1.58 @@ -2,7 +2,7 @@ /** * - * $Id: class.WikiParser.php,v 1.57 2005/07/26 16:53:10 cmarble Exp $ + * $Id: class.WikiParser.php,v 1.58 2005/07/27 20:11:09 cmarble Exp $ * * This file is part of coWiki. coWiki is free software under the terms of * the GNU General Public License (GPL). Read the LICENSE file. If you did @@ -21,7 +21,7 @@ * @author Daniel T. Gorski, <[email protected]> * @copyright (C) Daniel T. Gorski, {@link http://www.develnet.org} * @license http://www.gnu.org/licenses/gpl.html - * @version $Revision: 1.57 $ + * @version $Revision: 1.58 $ * */ @@ -387,10 +387,7 @@ $lastStr = $sStr; while( !preg_match( '=^</'.$aMatch[1].'>=is', $sStr, $aMatches ) ) { - if(preg_match( '#^<([^&]|(\&(?!gt;)))*>#is', $sStr, $aMatches )){ - $sContent .= $aMatches[0]; - $sStr = substr( $sStr, strlen( $aMatches[0] ) ); - } else if(preg_match( '=^([^&]|(\&(?!lt;)))*=is', $sStr, $aMatches )){ + if(preg_match( '=^([^&]|(&(?!lt;/'.$aMatch[1].'>)))*=is', $sStr, $aMatches ) ) { $sContent .= $aMatches[0]; $sStr = substr( $sStr, strlen( $aMatches[0] ) ); }