Feature summary: Have an option in the user preferences to not insert a summary header and/or detect if the submitted wikitext already starts with a level 2 header and skip the insertion of the summary header if it does.
Steps to reproduce (a list of clear steps to create the situation that made you report this, including full links if applicable):
- Copy the wikitext of an existing file page
- Go to Special:Upload
- Paste wikitext, upload some file
- Wild double header appears
Use case(s): I often create file pages by copy pasting them from existing files, for example the file page https://en.wikipedia.org/wiki/File:Bulgarian_Development_Bank_logo.png was copied from https://en.wikipedia.org/wiki/File:Bulgarian_Development_Bank_logo_(fair_use).gif with only the source changed, because I'm lazy. The bank has a new logo which I uploaded and the logo couldn't be converted to .gif very well, so overwriting was not an option.