On a homepage, I'm putting some "teaser" text about an article that page contains. The problem is, the article contains HTML code for font colors, images, etc. so, if my truncated text happens to cut right in the middle of a tag, the "click here" href is affected.
here's some sample HTML code of the problem:
<p><font... [<a href="moreinfo_51.html">read more</a>]
the browser is ignoring the href, but picks up after the href's closing greater-than bracket.
The code I'm using is pretty simple:
it looks for the first space after 120 characters, and calls that the break point. using striptags would eliminate the problem, but also strip out the formatting the client wants to see in the teaser text.
your ideas would be awesome.