This content has been marked as final. Show 4 replies
When I click on either parser.pls or test.sql, using Firefox 13.0.1, I get a browser window full of unformatted code. I could copy and paste it into a formatter, but it would be nice if there was a way to get it already formatted. I expected to click on it and have it act like a typical download, rather than just open up a window full of code.
Thanks for that. The problem is that the forum software isn't sending any mime-type header with the file (ideally it should be text/plain) so the browser is treating it as HTML. Not sure I can do anything about that, but I'll have a look.
The simple answer is to right-click and "Save Link As..." then edit the saved file in any text editor.
Edit: I now recall I've been here before. The answer is to upload two versions, one with a .txt suffix and provide that as an "open in browser" link. That gets the correct mime type of text/plain. However you still have to provide the original link or else when people save it it will have an extra .txt suffix, which Windows will often try to hide, so people wonder why they can't run the file .... aaarrrggghh!
Edited by: Roger Ford on Jul 11, 2012 10:02 AM
When I select the "open in browser" option for each now, I get formatted, readable code, which can easily be copied and pasted into a file without the extra txt extension, and I much prefer that. So, for me, that is a sufficient fix.
It seems like this is handy, virtually idiot-proof code, easy to create the package, easy to use it, and provides the Google-like search that users expect, without raising errors or producing unexpected results. Frequently, on the OraFAQ forums, where I am a moderator, when there are various ways to solve a problem and I provide a Text solution, the complaint is that it is too complicated to create all of the formatting to fix potential problems with user input. Your code solves that problem and I hope it will be included in the next version. If you don't mind, I will post an announcement in the OraFAQ Text forum with the permanent link that you provided.