@Test public void testPsuedoContainsWithParentheses() { Document doc = Jsoup.parse("<div><p id=1>This (is good)</p><p id=2>This is bad)</p>"); Elements ps1 = doc.select("p:contains(this (is good))"); assertEquals(1, ps1.size()); assertEquals("1", ps1.first().id()); Elements ps2 = doc.select("p:contains(this is bad\\))"); assertEquals(1, ps2.size()); assertEquals("2", ps2.first().id()); }
public static Elements select(String query, Element root) { return new Selector(query, root).select(); }
Selector { public static Elements select(String query, Element root) { return new Selector(query, root).select(); } }
Selector { public static Elements select(String query, Element root) { return new Selector(query, root).select(); } private  Selector(String query, Element root); private  Selector(Evaluator evaluator, Element root); }
Selector { public static Elements select(String query, Element root) { return new Selector(query, root).select(); } private  Selector(String query, Element root); private  Selector(Evaluator evaluator, Element root); static Elements select(String query, Element root); static Elements select(Evaluator evaluator, Element root); static Elements select(String query, Iterable<Element> roots); }
Selector { public static Elements select(String query, Element root) { return new Selector(query, root).select(); } private  Selector(String query, Element root); private  Selector(Evaluator evaluator, Element root); static Elements select(String query, Element root); static Elements select(Evaluator evaluator, Element root); static Elements select(String query, Iterable<Element> roots);  }