diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2006-09-12 21:47:40 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2006-09-12 21:47:40 +0000 |
| commit | b9d605af69dad64677af270dcb5ad0874a4b8a58 (patch) | |
| tree | c379ebd437e9457146829570069623316beea439 /plugins/format.tikiwiki.php | |
| parent | 8441f95e4437ed6aaafbbdf9f89ffedab3b2a5ab (diff) | |
| download | liberty-b9d605af69dad64677af270dcb5ad0874a4b8a58.tar.gz liberty-b9d605af69dad64677af270dcb5ad0874a4b8a58.tar.bz2 liberty-b9d605af69dad64677af270dcb5ad0874a4b8a58.zip | |
till trying to sort out this strange parsing bug
Diffstat (limited to 'plugins/format.tikiwiki.php')
| -rw-r--r-- | plugins/format.tikiwiki.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/format.tikiwiki.php b/plugins/format.tikiwiki.php index 2b73f66..661317c 100644 --- a/plugins/format.tikiwiki.php +++ b/plugins/format.tikiwiki.php @@ -1,6 +1,6 @@ <?php /** - * @version $Revision: 1.64 $ + * @version $Revision: 1.65 $ * @package liberty */ global $gLibertySystem; @@ -1015,10 +1015,12 @@ class TikiWikiParser extends BitBase { $repl = BitPage::getDisplayLink( $page_parse, $exists ); } // use preg_quote instead - //$slashedParse = preg_replace( "/([\/\[\]\(\)])/", "\\\\$1", $page_parse ); - // not sure why this is here - it breaks numeric 'create page' links in tables + // This breaks numeric 'create page' links in tables for unregistered users + //$slashed = preg_replace( "/([\/\[\]\(\)])/", "\\\\$1", $page_parse ); //$data = preg_replace("/([ \n\t\r\,\;]|^)".$slashedParse."($|[ \n\t\r\,\;\.])/", "$1"."$repl"."$2", $data); - $data = preg_replace( "/".preg_quote( $page_parse, "/" )."/", $repl, $data); + $data = preg_replace( "/([\s\,\;]|^)".preg_quote( $page_parse, "/" )."($|[\,\;\.])/", "$1".$repl."$2", $data); + //$test = preg_match( "/([\s\,\;]|^)".preg_quote( $page_parse, "/" )."($|[\,\;\.])/", $data); + //$data = preg_replace( "/".preg_quote( $page_parse, "/" )."/", $repl, $data); //$data = str_replace($page_parse,$repl,$data); } } |
