Hi,
with both Markdown and MarkdownExtra there are issues with very long content like inline images.
|
$text = preg_replace_callback( |
|
'{ |
|
(^.+?) # $1: Header text |
|
(?:[ ]+ ' . $this->id_class_attr_catch_re . ' )? # $3 = id/class attributes |
|
[ ]*\n(=+|-+)[ ]*\n+ # $3: Header footer |
|
}mx', |
|
array($this, '_doHeaders_callback_setext'), $text); |
and also the simpler
|
$text = preg_replace_callback('{ ^(.+?)[ ]*\n(=+|-+)[ ]*\n+ }mx', |
|
array($this, '_doHeaders_callback_setext'), $text); |
lead to "Backtrack limit exhausted" errors and empty content with the default
pcre.backtrack_limit of
1000000. I was about to create a re-producer, but I basically see the same issue on regex101.com and it might be simpler to play around with there:
https://regex101.com/r/BcWE82/1
Do you think this is something that can be improved or is it suggested to increase pcre.backtrack_limit to deal with this? This could be the same as #149
Hi,
with both
MarkdownandMarkdownExtrathere are issues with very long content like inline images.php-markdown/Michelf/MarkdownExtra.php
Lines 1065 to 1071 in 5161316
php-markdown/Michelf/Markdown.php
Lines 903 to 904 in 5161316
pcre.backtrack_limitof1000000. I was about to create a re-producer, but I basically see the same issue on regex101.com and it might be simpler to play around with there: https://regex101.com/r/BcWE82/1Do you think this is something that can be improved or is it suggested to increase
pcre.backtrack_limitto deal with this? This could be the same as #149