In the case of <a href="http://foo.com">Check out this site</a>
I'm wanting to strip out http://foo.com and can the rest. I'd rather display the link itself so users would know it's a link since there isn't any formatting in the summary. 1. strip out img tags but leave the src attribute value in place 2. strip out link tags but leave the href attribute value in place 3. strip out all other html entirely On Thu, Nov 17, 2011 at 11:13 AM, Matthew Woodward <[email protected]>wrote: > On Thu, Nov 17, 2011 at 8:50 AM, Jason King <[email protected]>wrote: > >> I first need to grab links out, and removing the <a href=""></a> but >> saving the link that's actually in the tag. >> > > Ok, but that doesn't answer my real question which is what if you have a > link like: > <a href="http://foo.com">Check out this site</a> > > If I'm understanding you correctly you LOSE the link in that case since > the text between the anchor tags is all you're keeping. Just want to make > sure that's a correct statement. > > Given your other examples it seems like all you really want to do is: > 1. strip out img tags but leave the src attribute value in place > 2. strip out all other html entirely > > -- > Matthew Woodward > [email protected] > http://blog.mattwoodward.com > identi.ca / Twitter: @mpwoodward > > Please do not send me proprietary file formats such as Word, PowerPoint, > etc. as attachments. > http://www.gnu.org/philosophy/no-word-attachments.html > > -- > online documentation: http://openbd.org/manual/ > google+ hints/tips: https://plus.google.com/115990347459711259462 > http://groups.google.com/group/openbd?hl=en > -- online documentation: http://openbd.org/manual/ google+ hints/tips: https://plus.google.com/115990347459711259462 http://groups.google.com/group/openbd?hl=en
