I want to write a script which can determine whether a link is internal or external. This is simple from my perspective, all internal links are relative, so they start with a /. All external links start with an http:// - all good so far. However I can't figure out how to do a ':contains()' on anything other than text - how can a search for a string within an attribute?
Once I can do this I'm happy to add target _blank myself, unless you know a better way to do it