You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried optimizing the regex, but couldn't achieve much. I'm just reporting issue here for information since in my case I just increase the backtracking limit. But it may be something good to optimize ;)
The text was updated successfully, but these errors were encountered:
Describe the Bug
With a docx file of roughly 5 pages (has full text on each page, with different styles)
Steps to Reproduce
Clone any block of a fairly big file (mine has 5 pages)
Expected Behavior
Blocks to be cloned
Current Behavior
Does not clone any block
Context
pcre.backtrack_limit | "1000000"
pcre.recursion_limit | "100000"
pcre.jit | "1"
The regex used (https://github.com/PHPOffice/PHPWord/blob/develop/src/PhpWord/TemplateProcessor.php#L739) has catastrophic backtracking when I try it on regex101.com and the only way to get this to work is to increase limit as following in my case:
ini_set("pcre.backtrack_limit", "23001337");
ini_set("pcre.recursion_limit", "23001337");
I tried optimizing the regex, but couldn't achieve much. I'm just reporting issue here for information since in my case I just increase the backtracking limit. But it may be something good to optimize ;)
The text was updated successfully, but these errors were encountered: