View Single Post
Old Jan 24th, 2006, 8:36 AM   #3
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Heh. Just make sure the GET string you receive has no wacko characters in it - I tend to just only allow alphanumerics, underscores, dashes, and single dots
s = "../.../bar"
while s.count(".."):
    s = s.replace("..", ".")
# s == "././bar", aka "bar"
Cerulean is offline   Reply With Quote