Issue with DataUrl as string if provides `slice` with start and stop
the following url is find invalid: `url = DataUrl(path='silx:///data/visitor/ls2914/id19/set40_tomo_black_drum_LPJ21_6p5mu_unload/set40_tomo_black_drum_LPJ21_6p5mu_unload_0001/set40_tomo_black_drum_LPJ21_6p5mu_unload_0001_0000.nx?path=/entry0000/instrument/detector/data&slice=2000:2021')`
diff --git a/silx/io/test/test_url.py b/silx/io/test/test_url.py
index e68c67a7b..114f6a706 100644
--- a/silx/io/test/test_url.py
+++ b/silx/io/test/test_url.py
@@ -152,6 +152,16 @@ class TestDataUrl(unittest.TestCase):
         expected = [True, True, None, "/a.h5", "/b", (5, 1)]
         self.assertUrl(url, expected)
 
+    def test_slice2(self):
+        url = DataUrl("/a.h5?path=/b&slice=2:5")
+        expected = [True, True, None, "/a.h5", "/b", (slice(2, 5),)]
+        self.assertUrl(url, expected)
+
+    def test_slice3(self):
+        url = DataUrl("/a.h5?path=/b&slice=::2")
+        expected = [True, True, None, "/a.h5", "/b", (slice(None, None, 2),)]
+        self.assertUrl(url, expected)
+
     def test_slice_ellipsis(self):
         url = DataUrl("/a.h5?path=/b&slice=...")
         expected = [True, True, None, "/a.h5", "/b", (Ellipsis, )]
diff --git a/silx/io/url.py b/silx/io/url.py
index 7607ae539..044977ccf 100644
--- a/silx/io/url.py
+++ b/silx/io/url.py
@@ -178,8 +178,20 @@ class DataUrl(object):
         def str_to_slice(string):
             if string == "...":
                 return Ellipsis
-            elif string == ":":
-                return slice(None)
+            elif ':' in string:
+                if string == ":":
+                    return slice(None)
+                else:
+                    def get_value(my_str):
+                        if my_str in ('', None):
+                            return None
+                        else:
+                            return int(my_str)
+                    sss = string.split(':')
+                    start = get_value(sss[0])
+                    stop = get_value(sss[1] if len(sss) > 1 else None)
+                    step = get_value(sss[2] if len(sss) > 2 else None)
+                    return slice(start, stop, step)
             else:
                 return int(string)
 
@@ -201,7 +213,10 @@ class DataUrl(object):
         :param str path: Path representing the URL.
         """
         self.__path = path
-        path = path.replace("::", "?", 1)
+        # only replace if ? not here already. Otherwise can mess sith
+        # data_slice if == ::2 for example
+        if '?' not in path:
+            path = path.replace("::", "?", 1)
         url = parse.urlparse(path)
 
         is_valid = True
['silx/io/test/test_url.py', 'silx/io/url.py']