Hi,
in smarty_outputfilter_trimwhitespace() filter there is a preg_replace() call
on line 72. When the scanned text, i.e. $source's content, is really long the
preg_replace() returns null which results into a blank page.
This is because of the usage backreferences in the pattern on line 65. On a
really long input the pcre.backtrack_limit is exceeded (see
http://php.net/manual/en/pcre.configuration.php) for default configuration.
Raising this limit helps.
According to the PHP guys it's not a bug that preg_replace() returns null in
such situations (see https://bugs.php.net/bug.php?id=63651). IMHO it is -
preg_replace() could throw an exception. Nevertheless I think it should be
fixed at least in Smarty. Probably by rewriting the pattern on line 65 to
something without backreferences (add some ORs)?
Thank you for your consideration.
Original issue reported on code.google.com by wirt...@gmail.com on 6 Jan 2015 at 1:42
Original issue reported on code.google.com by
wirt...@gmail.com
on 6 Jan 2015 at 1:42