diff --git a/src/main/java/org/apache/sling/fsprovider/internal/mapper/ContentFileResourceMapper.java b/src/main/java/org/apache/sling/fsprovider/internal/mapper/ContentFileResourceMapper.java
index 20739d6..bbf2af6 100644
--- a/src/main/java/org/apache/sling/fsprovider/internal/mapper/ContentFileResourceMapper.java
+++ b/src/main/java/org/apache/sling/fsprovider/internal/mapper/ContentFileResourceMapper.java
@@ -131,7 +131,7 @@
         if (!StringUtils.startsWith(path, providerRootPrefix)) {
             return null;
         }
-        String relPath = path.substring(providerRootPrefix.length());
+        String relPath = Escape.resourceToFileName(path.substring(providerRootPrefix.length()));
         for (String filenameSuffix : contentFileExtensions.getSuffixes()) {
             File file = new File(providerFile, relPath + filenameSuffix);
             if (file.exists()) {
diff --git a/src/main/java/org/apache/sling/fsprovider/internal/mapper/Escape.java b/src/main/java/org/apache/sling/fsprovider/internal/mapper/Escape.java
new file mode 100644
index 0000000..b28280f
--- /dev/null
+++ b/src/main/java/org/apache/sling/fsprovider/internal/mapper/Escape.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.fsprovider.internal.mapper;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+import java.util.BitSet;
+
+import org.apache.commons.lang3.CharEncoding;
+
+/**
+ * Manages deescaping for platform file names to resource names.
+ */
+public final class Escape {
+    
+    /**
+     * List of characters typically prohibited on unix and windows file systems.
+     * "/" is not included because it is neither allowed in resource nor in file names on any system. 
+     */
+    private static final char[] RESERVED_CHARS = {
+            '<',
+            '>',
+            ':',
+            '"',
+            '\\',
+            '|',
+            '?',
+            '*',
+            0x00
+    };
+    private static final BitSet RESERVED_CHARS_SET = new BitSet();
+    static {
+        for (int i=0; i<RESERVED_CHARS.length; i++) {
+            RESERVED_CHARS_SET.set(RESERVED_CHARS[i]);
+        }
+    }
+    
+    private Escape() {
+        // static methods only
+    }
+    
+    /**
+     * Convert file name to resource name.
+     * Applies same rules as Apache Sling JCR ContentLoader. 
+     * @param path File name or path
+     * @return Resource name or path
+     */
+    public static String fileToResourceName(String path) {
+        // check for encoded characters (%xx)
+        // has encoded characters, need to decode
+        if (path.indexOf('%') >= 0) {
+            try {
+                return URLDecoder.decode(path, "UTF-8");
+            }
+            catch (UnsupportedEncodingException ex) {
+                throw new RuntimeException("Unsupported encoding.", ex);
+            }
+        }
+        return path;
+    }
+    
+    /**
+     * Converts resource name to file name.
+     * Allows all characters, but URL-encodes characters that are in the list of {@link #RESERVED_CHARS}.
+     * @param name Resource name or path
+     * @return File name or path
+     */
+    public static String resourceToFileName(String path) {
+        try {
+            StringBuilder result = new StringBuilder();
+            for (int i=0; i<path.length(); i++) {
+                char c = path.charAt(i);
+                if (RESERVED_CHARS_SET.get(c)) {
+                    result.append(URLEncoder.encode(String.valueOf(c), CharEncoding.UTF_8));
+                }
+                else {
+                    result.append(c);
+                }
+            }
+            return result.toString();
+        }
+        catch (UnsupportedEncodingException ex) {
+            throw new RuntimeException("Unsupported encoding.", ex);
+        }
+    }
+
+}
diff --git a/src/main/java/org/apache/sling/fsprovider/internal/mapper/FileResourceMapper.java b/src/main/java/org/apache/sling/fsprovider/internal/mapper/FileResourceMapper.java
index 47404f8..e29b408 100644
--- a/src/main/java/org/apache/sling/fsprovider/internal/mapper/FileResourceMapper.java
+++ b/src/main/java/org/apache/sling/fsprovider/internal/mapper/FileResourceMapper.java
@@ -121,7 +121,7 @@
             @Override
             public Object transform(Object input) {
                 File file = (File)input;
-                String path = parentPath + "/" + file.getName();
+                String path = parentPath + "/" + Escape.fileToResourceName(file.getName());
                 return new FileResource(resolver, path, file, contentFileExtensions, contentFileCache, fsMode);
             }
         });
@@ -140,7 +140,7 @@
             return providerFile;
         }
         if (path.startsWith(providerRootPrefix)) {
-            String relPath = path.substring(providerRootPrefix.length());
+            String relPath = Escape.resourceToFileName(path.substring(providerRootPrefix.length()));
             File file = new File(providerFile, relPath);
             if (file.exists() && !contentFileExtensions.matchesSuffix(file)) {
                 return file;
diff --git a/src/test/java/org/apache/sling/fsprovider/internal/FilesFolderTest.java b/src/test/java/org/apache/sling/fsprovider/internal/FilesFolderTest.java
index c1f3470..7ebc089 100644
--- a/src/test/java/org/apache/sling/fsprovider/internal/FilesFolderTest.java
+++ b/src/test/java/org/apache/sling/fsprovider/internal/FilesFolderTest.java
@@ -63,10 +63,11 @@
     @Test
     public void testFiles() {
         assertFile(fsroot, "folder1/file1a.txt", "file1a");
-        assertFile(fsroot, "folder1/file1b.txt", "file1b");
+        assertFile(fsroot, "folder1/sling:file1b.txt", "file1b");
         assertFile(fsroot, "folder1/folder11/file11a.txt", "file11a");
         assertFile(fsroot, "folder2/content.json", null);
         assertFile(fsroot, "folder2/content/file2content.txt", "file2content");
+        assertFile(fsroot, "folder2/content/sling:content2.json", null);
         assertFile(fsroot, "folder3/content.jcr.xml", null);
     }
 
@@ -74,7 +75,7 @@
     public void testListChildren() {
         assertThat(root, ResourceMatchers.containsChildren("fs-test"));
         assertThat(fsroot, ResourceMatchers.hasChildren("folder1", "folder2", "folder3"));
-        assertThat(fsroot.getChild("folder1"), ResourceMatchers.hasChildren("folder11", "file1a.txt", "file1b.txt"));
+        assertThat(fsroot.getChild("folder1"), ResourceMatchers.hasChildren("folder11", "file1a.txt", "sling:file1b.txt"));
         assertThat(fsroot.getChild("folder2"), ResourceMatchers.hasChildren("folder21", "content.json"));
         assertFalse(fsroot.getChild("folder1/file1a.txt").listChildren().hasNext());
     }
diff --git a/src/test/java/org/apache/sling/fsprovider/internal/JcrMixedTest.java b/src/test/java/org/apache/sling/fsprovider/internal/JcrMixedTest.java
index 9a220d9..b3e4d3b 100644
--- a/src/test/java/org/apache/sling/fsprovider/internal/JcrMixedTest.java
+++ b/src/test/java/org/apache/sling/fsprovider/internal/JcrMixedTest.java
@@ -82,7 +82,7 @@
     @Test
     public void testFiles() {
         assertFile(fsroot, "folder1/file1a.txt", "file1a");
-        assertFile(fsroot, "folder1/file1b.txt", "file1b");
+        assertFile(fsroot, "folder1/sling:file1b.txt", "file1b");
         assertFile(fsroot, "folder1/folder11/file11a.txt", "file11a");
         assertFile(fsroot, "folder2/content.json", null);
 
@@ -97,7 +97,7 @@
     public void testListChildren() {
         assertThat(root, ResourceMatchers.containsChildren("fs-test"));
         assertThat(fsroot, ResourceMatchers.hasChildren("folder1", "folder2", "folder99"));
-        assertThat(fsroot.getChild("folder1"), ResourceMatchers.hasChildren("file1a.txt", "file1b.txt", "file1c.txt"));
+        assertThat(fsroot.getChild("folder1"), ResourceMatchers.hasChildren("file1a.txt", "sling:file1b.txt", "file1c.txt"));
     }
 
 }
diff --git a/src/test/java/org/apache/sling/fsprovider/internal/JcrXmlContentTest.java b/src/test/java/org/apache/sling/fsprovider/internal/JcrXmlContentTest.java
index 7bb6cee..45ec86f 100644
--- a/src/test/java/org/apache/sling/fsprovider/internal/JcrXmlContentTest.java
+++ b/src/test/java/org/apache/sling/fsprovider/internal/JcrXmlContentTest.java
@@ -81,7 +81,7 @@
     @Test
     public void testFiles() {
         assertFile(fsroot, "folder1/file1a.txt", "file1a");
-        assertFile(fsroot, "folder1/file1b.txt", "file1b");
+        assertFile(fsroot, "folder1/sling:file1b.txt", "file1b");
         assertFile(fsroot, "folder1/folder11/file11a.txt", "file11a");
         assertFile(fsroot, "folder2/content.json", null);
         assertNull(fsroot.getChild("folder3/content.jcr.xml"));
@@ -91,7 +91,7 @@
     public void testListChildren() {
         assertThat(root, ResourceMatchers.containsChildren("fs-test"));
         assertThat(fsroot, ResourceMatchers.hasChildren("folder1", "folder2"));
-        assertThat(fsroot.getChild("folder1"), ResourceMatchers.hasChildren("folder11", "file1a.txt", "file1b.txt"));
+        assertThat(fsroot.getChild("folder1"), ResourceMatchers.hasChildren("folder11", "file1a.txt", "sling:file1b.txt"));
         assertThat(fsroot.getChild("folder2"), ResourceMatchers.hasChildren("folder21", "content"));
     }
 
diff --git a/src/test/java/org/apache/sling/fsprovider/internal/JsonContentTest.java b/src/test/java/org/apache/sling/fsprovider/internal/JsonContentTest.java
index 553080f..02298c2 100644
--- a/src/test/java/org/apache/sling/fsprovider/internal/JsonContentTest.java
+++ b/src/test/java/org/apache/sling/fsprovider/internal/JsonContentTest.java
@@ -91,7 +91,7 @@
     @Test
     public void testFiles() {
         assertFile(fsroot, "folder1/file1a.txt", "file1a");
-        assertFile(fsroot, "folder1/file1b.txt", "file1b");
+        assertFile(fsroot, "folder1/sling:file1b.txt", "file1b");
         assertFile(fsroot, "folder1/folder11/file11a.txt", "file11a");
         assertNull(fsroot.getChild("folder2/content.json"));
         assertFile(fsroot, "folder2/content/file2content.txt", "file2content");
@@ -102,7 +102,7 @@
     public void testListChildren() {
         assertThat(root, ResourceMatchers.containsChildren("fs-test"));
         assertThat(fsroot, ResourceMatchers.hasChildren("folder1", "folder2"));
-        assertThat(fsroot.getChild("folder1"), ResourceMatchers.hasChildren("folder11", "file1a.txt", "file1b.txt"));
+        assertThat(fsroot.getChild("folder1"), ResourceMatchers.hasChildren("folder11", "file1a.txt", "sling:file1b.txt"));
         assertThat(fsroot.getChild("folder2"), ResourceMatchers.hasChildren("folder21", "content"));
     }
 
@@ -285,4 +285,11 @@
         assertEquals("en", node.getProperty("jcr:language").getString());
     }
 
+    @Test
+    public void testContent2() throws RepositoryException {
+        Resource content2 = fsroot.getChild("folder2/content/sling:content2");
+        assertNotNull(content2);
+        assertEquals("app:Page", content2.getResourceType());
+    }
+
 }
diff --git a/src/test/java/org/apache/sling/fsprovider/internal/TestUtils.java b/src/test/java/org/apache/sling/fsprovider/internal/TestUtils.java
index d077b34..05a5524 100644
--- a/src/test/java/org/apache/sling/fsprovider/internal/TestUtils.java
+++ b/src/test/java/org/apache/sling/fsprovider/internal/TestUtils.java
@@ -39,6 +39,7 @@
 import org.apache.sling.api.SlingConstants;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.fsprovider.internal.FileMonitor.ResourceChange;
+import org.apache.sling.fsprovider.internal.mapper.Escape;
 import org.apache.sling.hamcrest.ResourceMatchers;
 import org.apache.sling.testing.mock.osgi.MapUtil;
 import org.apache.sling.testing.mock.osgi.context.AbstractContextPlugin;
@@ -85,8 +86,7 @@
         assertEquals("nt:file", file.getResourceType());
         
         assertNull(file.getResourceSuperType());
-        assertEquals(file.getName(), file.adaptTo(File.class).getName());
-        assertTrue(StringUtils.contains(file.adaptTo(URL.class).toString(), file.getName()));
+        assertEquals(file.getName(), Escape.fileToResourceName(file.adaptTo(File.class).getName()));
         
         if (content != null) {
             try {
diff --git a/src/test/java/org/apache/sling/fsprovider/internal/mapper/EscapeTest.java b/src/test/java/org/apache/sling/fsprovider/internal/mapper/EscapeTest.java
new file mode 100644
index 0000000..a44bda4
--- /dev/null
+++ b/src/test/java/org/apache/sling/fsprovider/internal/mapper/EscapeTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.fsprovider.internal.mapper;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class EscapeTest {
+
+    @Test
+    public void testFileToResourceName() {
+        assertEquals("abc", Escape.fileToResourceName("abc"));
+        assertEquals("abc.txt", Escape.fileToResourceName("abc.txt"));
+        assertEquals("xyz:abc.txt", Escape.fileToResourceName("xyz%3Aabc.txt"));
+        assertEquals("a<>:\"/\\|?*b", Escape.fileToResourceName("a%3C%3E%3A%22/%5C%7C%3F%2Ab"));
+        assertEquals("", Escape.fileToResourceName(""));
+    }
+
+    @Test
+    public void testResourceToFileName() {
+        assertEquals("abc", Escape.resourceToFileName("abc"));
+        assertEquals("abc.txt", Escape.resourceToFileName("abc.txt"));
+        assertEquals("xyz%3Aabc.txt", Escape.resourceToFileName("xyz:abc.txt"));
+        // URLEncoder does not encode '*'
+        assertEquals("a%3C%3E%3A%22/%5C%7C%3F*b", Escape.resourceToFileName("a<>:\"/\\|?*b"));
+        assertEquals("", Escape.resourceToFileName(""));
+    }
+
+}
diff --git a/src/test/resources/fs-test/folder1/file1b.txt b/src/test/resources/fs-test/folder1/sling%3Afile1b.txt
similarity index 100%
rename from src/test/resources/fs-test/folder1/file1b.txt
rename to src/test/resources/fs-test/folder1/sling%3Afile1b.txt
diff --git a/src/test/resources/fs-test/folder2/content/content2.json b/src/test/resources/fs-test/folder2/content/sling%3Acontent2.json
similarity index 100%
rename from src/test/resources/fs-test/folder2/content/content2.json
rename to src/test/resources/fs-test/folder2/content/sling%3Acontent2.json
