Not able to open a file attachment (file name has # in it)

Dynamically creating anchor tags to open file attachments. I am getting a problem to open files whose names have “#” in them. When I click the link its ignoring the file name right to “#” symbol. I have the URL like this. file one.

Please help me to resolve the issue/problem or suggest me a work around for this.

Thanks in advance.

Subject: Not able to open a file attachment (file name has # in it)

You need to URL-encode the octothorpe (#) – that character has a reserved meaning in a URL.