summaryrefslogtreecommitdiff
path: root/inc/parser
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2011-02-09 11:14:09 +0100
committerMichael Hamann <michael@content-space.de>2011-02-09 11:14:09 +0100
commitf25fcf537e1a3223cce417ba01dc63d79b80a6f7 (patch)
treec34e1bb04d625125715cc56a8286872b9da3b806 /inc/parser
parent0411c186caeff3347eccfa98d5cacc280a356d20 (diff)
downloadrpg-f25fcf537e1a3223cce417ba01dc63d79b80a6f7.tar.gz
rpg-f25fcf537e1a3223cce417ba01dc63d79b80a6f7.tar.bz2
Make the regex for internal links more restrictive
This fixes a PCRE backtrack error that occurred on large pages like :users on dokuwiki.org.
Diffstat (limited to 'inc/parser')
-rw-r--r--inc/parser/parser.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index a7764ee9c..e47ce56fa 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -828,7 +828,7 @@ class Doku_Parser_Mode_internallink extends Doku_Parser_Mode {
function connectTo($mode) {
// Word boundaries?
- $this->Lexer->addSpecialPattern("\[\[(?:(?:.*?\[.*?\])|.+?)\]\]",$mode,'internallink');
+ $this->Lexer->addSpecialPattern("\[\[(?:(?:[^[\]]*?\[.*?\])|.+?)\]\]",$mode,'internallink');
}
function getSort() {