[3.9] bpo-41043: Escape literal part of the path for glob(). (GH-20994). (GH-21275)

(cherry picked from commit 935586845815f5b4c7814794413f6a812d4bd45f)
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 931a039..0810235 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -474,7 +474,7 @@
         except Exception:
             ret = []
         # Then, try to complete file names as well.
-        globs = glob.glob(text + '*')
+        globs = glob.glob(glob.escape(text) + '*')
         for fn in globs:
             if os.path.isdir(fn):
                 ret.append(fn + '/')