Menu

#323 preg_replace() and large html

v1.0_(example)
open
nobody
None
1
2014-08-01
2014-08-01
Maxim
No

getHtmlDomArray() return null on large (>1MB) html without any warnings.

problem in: $html = preg_replace('/<head([^>])>(.*?)<\/head>/siU', '', $html);
(and possible in similar other regular expressions)
and pcre.backtrack_limit setting.

Can you rewrite this replace with stripos(), for example. Longer, but without this limit. Or output some kind of error.

thank you.

Discussion

  • Nicola Asuni

    Nicola Asuni - 2014-08-01

    Ticket moved from /p/tcpdf/bugs/957/

     
  • Nicola Asuni

    Nicola Asuni - 2014-08-01

    Please nothe that TCPDF is not intended to convert HTML documents.
    TCPDF support some XHTML syntax to facilitate the formatting.

     

Log in to post a comment.