Last modified: 2011-03-13 18:06:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8775 - ctype=text/plain
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
PC Linux
: Lowest minor (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-01-25 19:14 UTC by Dan Jacobson
Modified: 2011-03-13 18:06 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Dan Jacobson 2007-01-25 19:14:49 UTC says

    the content-type value to be used in the HTTP header when
    returning the raw content, instead of the default text/x-wiki;
    this can only be one of the allowed types, which currently are
    text/x-wiki, text/javascript, text/css, and

What is wrong with adding text/plain to the allowed types? You must
admit that would be the most reasonable choice to be able to read raw
wikitext in some browsers.
Comment 1 Brion Vibber 2007-01-25 20:41:28 UTC
text/plain is unsafe, as a number of browsers interpret it as "go ahead and try
to detect the file type and if it looks like HTML render it as HTML". Hence,
arbitrary JavaScript execution.

You may thank Microsoft and Apple for that.
Comment 2 Jim R. Wilson 2007-02-24 21:35:30 UTC
If you're feeling hackish, 'text/css' offers a dirty alternative.  All major
browsers render text/css just like text/plain (as of the time of this writing).

So instead of linking to "?title=Some_Page&action=raw", try

At least it'll stay in-browser and not prompt you to download the thing.

Note You need to log in before you can comment on or make changes to this bug.