[thelist] ASP: First 100 words in a record
rudy
r937 at interlog.com
Wed Jun 19 11:38:08 CDT 2002
> After a bit of reflection, the first x characters might just
> be a better way of doing this, rather than the first x words.
> Doesn't help that it's a LOT easier to do, of course... :)
it's not quite that simple
if there's an html tag inside the first x characters, you can end up with
invalid code that can seriously mess up your page
for example,
blah bla blah <a href="http://evo <== truncated after the o
the benefit of a separate synopsis field is that it can contain a, um,
synopsis of the article, a catchier description than what you'd find in
the first x characters
if you do go with truncating x characters, you may want to back it up to
the last closed tag, or failing that, at least the last space...
rudy
More information about the thelist
mailing list