How about slicing to 1000 (or however much you want to be safe that
you'll get 200 of non-tags), then strip, then slice down to 200.

For a slightly different approach there is a patch I wrote for
providing an html-aware truncatewords filter at
http://code.djangoproject.com/ticket/2027 which you could try using.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to