Use method available in all browsers (#13804)

String.contains work in Firefox, not in Chrome or Opera

Change-Id: I074d3c79629fd699841d3b39a36620511233ce6c