It makes sense except you haven't said what part of the post you want to *KEEP*.
That code is stripping out *ALL* HTML tags. Is that what you want?
But the code is really really funky.
Code:
if(img.length<=1)
{
imgtag = '<span style="float:left; padding:0px 10px 5px 0px;">'
+ '<a href="'+pURL+'"><img src=".../017.jpg".../></a></span>';
summ = summary_img;
}
if(img.length>=1)
{
imgtag = '<span style="padding:0px 0px 10px 0px;">'
+ '<a href="'+pURL+'"><img src="'+img[0].src+'" .../></a></span>';
summ = summary_img;
}
That is *IDIOTIC* code!
If img.length is *exactly* 1 (that is, if there is exactly 1 image within the <div>) then that code will first set
imgtag to the one string and then to the other!
And there is similar insanity with the
if (postCount>=1) stuff.
On top of that, the code to strip the HTML tags is braindead.
It wouldn't give me much confidence in using this software.