random code/altered sanitizing code  for uploads, rel #371