Index: oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java
===================================================================
--- oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java	(revision 1528832)
+++ oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java	(working copy)
@@ -68,4 +68,17 @@
                 "xpath",
                 ImmutableList.of("/content/testFullTextTermNameFile.txt"));
     }
+
+    @Test
+    public void testEscapedQuote() throws Exception {
+        Tree c = root.getTree("/").addChild("content");
+        c.addChild("one").setProperty("prop", "exact\"quote");
+        c.addChild("two").setProperty("prop", "exact\'quote");
+        root.commit();
+
+        assertQuery("//*[jcr:contains(., 'exact\"quote')]", "xpath",
+                ImmutableList.of("/one"));
+        assertQuery("//*[jcr:contains(., 'exact\'quote')]", "xpath",
+                ImmutableList.of("/two"));
+    }
 }
