Does JavaScript have a way of truncating HTML text without all the headaches of matching tags etc etc?
Thank you.
I know this question is old, but I recently had the same problem. I wrote the following library, which truncates valid HTML safely: https://github.com/arendjr/text-clipper