For the record, the "Open in Browser" extension does this, and gets it exactly right. Why this cannot be implemented natively in Firefox is beyond me, but a workaround and model implementation exists.
http://www.spasche.net/mozilla/ The canonical related upstream bug is https://bugzilla.mozilla.org/show_bug.cgi?id=57342 and I think there is one in the Debian BTS about this too. -- Option to display file in browser, treat as text/plain https://launchpad.net/bugs/25830 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs