开发者

unclosed tags in html ASP.Net MVC

i have a description of a product who fill by ckeditor. i show a part of the description on the page. the problem is that they create a problem.

suppose ckeditor created <p>blahblah</p> and i cut the text to the limit code hav开发者_开发技巧e then logically p tag is not closed. so here is something i can do.

close the tag. are i can get the text from them and append inside the div i create. well how i can do that.


So the issues is that you need to display a excerpt of the full description? Is it feasible, in that case, to just strip HTML and just display a certain amount of characters?


If you need extract text from html or fix the html you can try using Html Agility Pack

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜