I have django app that allows users to enter a query and in response returns a list of documents sorted by their relevance. On clicking the download button the users can download the files. For most cases the option works fine but breaks when the file name or the folder path has special characters (such as - &). The download button contains the location of where the file is located. If the path or filename contains a special character, only the string upto the special character is passed to the function in the views.py file and hence returns a FileNotFoundError at ....
So how do I ensure that django reads the complete path in cases where there are special characters involved