Re: Read more link with HTML code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hmmm... Perhaps you should think about separating the tags from the content? Do something like:

//Strip tags from content and add a few char hook to be used for re-insertion //Count 200 chars (ignoring any hooks found while parsing and thereby not adding it to the char count)
//Make sure last char is a space or something appropriate
//re-insert tags over the hooks (count tags used & tags closed)
//close any inserted tags that aren't closed already in nested order

Mike van Hoof wrote:
Hello list,

I got a problem with displaying content in a "read more block" which contains HTML code.
The problem is as followes:

I got a large piece of content, which contains HTML code (<b><u><i> etc), but after 200 characters a read more link appears. At the moment I strip al the HTML out of this piece of content, and display the full set off content on another page. But now i also want to display the bold text etc. in the first (200 chrs) content block. The only problem i have here, is that when I got a bold tag opend in the first 200 chrs, and it's closed after 400 chrs, then the rest off the page is also bold.

somebody got a solution ?

Thanks for reading.

Mike



--
Thanks,

Jim

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux