Releases: Simbiat/HTMLCut
1.2.3+20240407
Upped PHP version, minor optimizations
1.2.2+20221211
Handled potential corruption when using LIBXML_HTML_NOIMPLIED
Improved placement of ellipsis, if string ends with closing tags
1.2.1+20221111
Adjusted cutting for some complex HTML nodes combinations
Fixed logic for determining when to add ellipsis
Adjusted regex for newlines
Removed <br>
from implode()
when cutting paragraphs (using \r\n
instead)
1.2.0+20221105
Treat HTML entities as single character
Improved removal of empty nodes
1.1.2+20221104
Handle extra p
tag added by conversion to HTML
Removed nl2br
1.1.1+20221010
Updated domain for website
1.1.0+20220809
The function is now a static, since this is more of a helper function.
1.0.5+20220723
Remove HTML comments, CDATA and DOCTYPE
1.0.4+20220710
Better handling of empty nodes
Strip PHP's tags added on loadHTML()
/saveHTML()
Trim final string
Show ellipsis only if text was cut (based on initial length)
Adjustments to readme
1.0.3+20210525
Styling, mistypes correction and small adjustments based on PHPStrom suggestions/recommendations