Modified parse_command to unquote URL properly. #6368

Added test.
Just do this once. no need of loop.