[BUGFIX] Fix too long regular expression error in ContentObjectRenderer
Text cropping on texts with way more than 1000 characters triggers regular expression compilation errors. The sweet spot was determined to a value of max 962 characters, thus leading to internal 'preg_match' error state and throwing 'Compilation failed: regular expression is too large' warning. The patch crops text in multiple chunks and reassembles the chunks until crop position was reached to avoid this internal error exceeding the max regular expression pattern length. Further tests are added to cover this scenario. Resolves: #77642 Releases: master, 10.4 Change-Id: I15b778370df0d0a3d3087a0b199c3e16f7a46add Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72048 Tested-by:core-ci <typo3@b13.com> Tested-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
parent
6359edb1
Please register or sign in to comment