On Thursday, 25 February 2016 at 23:59:04 UTC, crimaniak wrote:
Where is only a couple of ad-hoc checks for attributes values. This language is not XPath-compatible, so most easy way to cover a lot of cases is regex check for attributes. Something like "script[src/https:.+\\.googleapis\\.com/i]"

The css3 selector standard offers three substring search: [attr^=foo] if it begins with foo, [attr$=foo] if it ends with foo, and [attr*=foo] if it includes foo somewhere. dom.d supports all three now.

So for your regex, you could probably match: [attr*=googleapis.com] well enough.

Reply via email to