How to remove link attributes with regex

I'm trying to remove rel and target attributes from a RSS description using regex but can't seem to figure it out. I'm able to remove classes and styles, but rel and target just won't work. Here's what I'm currently trying:

<a(.*?) target="(.*?)"

replacing it with <a$1

Any ideas??

3 Replies
  • update: it seems even hard coding a generic URL href will still add the rel="nofollow" target="_blank" to the link. Is this just something we have to deal with??

  • rel="nofollow" target="_blank"

    It's automatically added there's no way to remove it (in pipes).

  • That's kinda what I figured. I ended up using jquery in my page to remove them...


Recent Posts

in Pipes