Merge pull request #1809 from juzser/dev-master
Update the regexp to avoid catastrophic backtracking
This commit is contained in:
commit
ca45d14511
|
|
@ -798,7 +798,7 @@ class TemplateProcessor
|
|||
$xmlBlock = null;
|
||||
$matches = array();
|
||||
preg_match(
|
||||
'/(<\?xml.*)(<w:p\b.*>\${' . $blockname . '}<\/w:.*?p>)(.*)(<w:p\b.*\${\/' . $blockname . '}<\/w:.*?p>)/is',
|
||||
'/(.*((?s)<w:p\b(?:(?!<w:p\b).)*?\${' . $blockname . '}<\/w:.*?p>))(.*)((?s)<w:p\b(?:(?!<w:p\b).)[^$]*?\${\/' . $blockname . '}<\/w:.*?p>)/is',
|
||||
$this->tempDocumentMainPart,
|
||||
$matches
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue