I have a web page that pulls in several javascript files in the HEAD section. The path to one of those files is generated dynamically, and I'm seeing an issue with some paths that include the # character. For example, the following path does not resolve correctly, and therefore the .js file does not load (even though I've verified that it exists):
<script src="\\remote_machine\share\test\this is #3 test\test.js"></script>
I'm wondering what the special meaning of '#3' is in this situation. I've tried replacing the # character with the equivalent html entity, like so:
<script src="\\remote_machine\share\test\this is #3 test\test.js"></script>
but that does not resolve the issue. Further, I notice that the following path does resolve correctly (assuming the file exists):
<script src="\\remote_machine\share\test\this is # test\test.js"></script>
Could anyone explain the meaning of '#3' in the context of html as described? What's the recommended fix?
EDIT: I've tried replacing the '#' with "%23" in all three examples above. The first two remain broken, and the third no longer works. If I additionally replace all spaces with %20, I get the same result.