Screenshot
Steps to reproduce:
1.Open a page with VE
2.Add a heading
3.Select the text of the heading and insert a gallery
4.The gallery gets added as part of the heading
5.Save the page and observe the page content in the readmode
Observed Result:
In readmode , the heading text and caption of the gallery gets repeated immediately following the heading section.Also gallery is not showing up as part of the heading where as in wikitext editor it is inside ==heading== and also in VE
See the screenshot attached
Test Environment: https://test2.wikipedia.org/
Browser: FF 25
OS: MAC OS X 10. 8. 5
https://test2.wikipedia.org/w/index.php?title=Totalnewheading
Version: unspecified
Severity: normal
Attached: