php-htmltruncator icon indicating copy to clipboard operation
php-htmltruncator copied to clipboard

Non-self-closing tags without text get removed

Open patkruk opened this issue 10 years ago • 0 comments

The library removes non-self-closing tags without text, such as an iframe.

For example:

* string: <div class="media-pull-center media-width-full"><div class="embed-responsive embed-responsive-16by9"><iframe src="https://link.brightcove.com/services/player/" frameborder="0" allowfullscreen></iframe></div><div class="content-item__credit pull-right">Credit</div><div class="content-item__caption clearfix">Caption</div></div>
* length: 500
* result: <div class="media-pull-center media-width-full"><div class="content-item__credit pull-right">Credit</div><div class="content-item__caption clearfix">Caption</div></div>
* desired result: <div class="media-pull-center media-width-full"><div class="embed-responsive embed-responsive-16by9"><iframe src="https://link.brightcove.com/services/player/" frameborder="0" allowfullscreen></iframe></div><div class="content-item__credit pull-right">Credit</div><div class="content-item__caption clearfix">Caption</div></div>

patkruk avatar Mar 11 '15 16:03 patkruk