I added the js extension to the "Default permitted file extensions" field on Site Configuration. However, when I upload a .js script as an attachment to a new Page (Input Format: PHP code), it's automatically appended a .txt extension.
Is there a way to disable the automatic extension modification? The script is safe, I'm not concerned with that.

I am using Drupal 5.1

P.S.: I guess I can always manually rename the file, but I was wondering if there is a more elegant method than that.

Comments

Steven’s picture

This is necessary for making the .js file viewable in some versions of IE if I remember correctly. If you rename it, people who click the link might end up running the JS instead of seeing it (though in the global windows scripting host, instead of IE, I think).

So it's not just for security reasons.

--
If you have a problem, please search before posting a question.