I have to display first N (for example say 50 or 100) characters out of entire html string. I have to display well formated html.If i apply simple substring that will get me a malformated html string E.g.
Sample string:<html><one>a href=“http://foo.com”>foo</a></ person></html>
侵扰性体:<html><one>a href=“http://foo.com”>foo<
这会给我畸形的HTML :(
如何实现这一点,有任何想法吗?