diff options
| author | Jams H Thompson <jht001@users.sourceforge.net> | 2006-06-30 06:22:28 +0000 |
|---|---|---|
| committer | Jams H Thompson <jht001@users.sourceforge.net> | 2006-06-30 06:22:28 +0000 |
| commit | ae56ae181ba2642507bbf99c8b00f6fb40a1e887 (patch) | |
| tree | 5506bd6fba284608158f895eb9ad6ed4de101698 | |
| parent | 3ab9d9ce6ae9e05908bb51ea550ff3fc13432dd1 (diff) | |
| download | liberty-ae56ae181ba2642507bbf99c8b00f6fb40a1e887.tar.gz liberty-ae56ae181ba2642507bbf99c8b00f6fb40a1e887.tar.bz2 liberty-ae56ae181ba2642507bbf99c8b00f6fb40a1e887.zip | |
simplify pattern match to avoid PHP seg faults on large pages
| -rw-r--r-- | plugins/format.tikiwiki.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/format.tikiwiki.php b/plugins/format.tikiwiki.php index a775cc7..e54be21 100644 --- a/plugins/format.tikiwiki.php +++ b/plugins/format.tikiwiki.php @@ -1,6 +1,6 @@ <?php /** - * @version $Revision: 1.56 $ + * @version $Revision: 1.57 $ * @package liberty */ global $gLibertySystem; @@ -662,7 +662,7 @@ class TikiWikiParser extends BitBase { function parse_mediawiki_tables( $data ) { //DEBUG: $data = "\n<!-- parse_mediawiki_tables() called. -->\n" . $data; /* Find all matches to {|...|} with no {| inside. */ - while (preg_match('/\n\{\|(((?<!\{)\||[^\|])+)\n\|\}/sm', $data, $matches)) { + while (preg_match('/\n\{\|(.*?)\n\|\}/sm', $data, $matches)) { //DEBUG: vd($matches); $table_data = str_replace("\r", "", $matches[1]); $table_data = str_replace('||', "\n|", $table_data); |
