TruncHTML
| Version | Released | Type | License |
|---|---|---|---|
| 1.2.2 | 2008-02-15 | Plugins | Freeware (?) |
The difference is, that TruncHTML is HTML-aware, so you can use it to shorten HTML-formatted text and keep the markup without being afraid of breaking it.
Unlike the standard limiter-plugins it does not count characters that belong to HTML-tags and does not cut-off in the middle of tags.
| Example: Limit to 16 characters. |
Take a look <a href="ref.html"><img src="arrow.gif" /></a> at this page.
|
| TruncHTML: |
Take a look <a href="ref.html"><img src="arrow.gif" /></a> at
|
| Standard char_limit: |
Take a look <a href="ref.html"><img…
|
Furthermore it tries its best to close all tags that remain open after the text has been limited.
So if you limit the following text to 80 chars...
<p class="quote"><b>Never let your sense of morals get in the way of doing what's right.<br />
<em>Isaac Asimov</em></b></p>
the result will be ...
<p class="quote"><b>Never let your sense of morals get in the way of doing what's right.<br />
<em>Isaac</em></b></p>
instead of ...
<p class="quote"><b>Never let your sense of morals get in the way of doing what's
... which would probably screw the rest of the page.
[...]there wouldn’t be anything wrong with a separate plugin that is content aware. Silenz’s TruncHTML does a fabulous job with that, in fact I use it myself, and I don’t particularly see a reason for a first party solution to be made.[...]
Derek Jones, EllisLab