**Steps to replicate the issue** (include links if applicable):
* Enable "Advanced mode" in Special:MobileOptions
* Open the history of any page on a mobile site, e.g. [[https://test.m.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&action=history|testwiki:Wikipedia:Sandbox]]
* Click the first "undo"
* Click "Publish changes", "Show preview", or "Show changes"
**What happens?**:
You are led to https://test.m.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&action=submit, which says "The editor will now load. If you still see this message after a few seconds, please reload the page." The "reload the page" part is linked to a URL like this:
```
https://test.wikipedia.org/w/index.php?mw-twocolconflict-js=1&wpUnicodeCheck=%E2%84%B3%F0%9D%92%B2%E2%99%A5%F0%9D%93%8A%F0%9D%93%83%F0%9D%92%BE%F0%9D%92%B8%E2%84%B4%F0%9D%92%B9%E2%84%AF&wpAntispam=&wikieditorUsed=yes&editingStatsId=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&wpSection=&wpStarttime=20230415xxxxxx&wpEdittime=20230414210125&editRevId=564569&wpScrolltop=0&wpAutoSummary=d41d8cd98f00b204e9800998ecf8427e&oldid=0&parentRevId=564569&format=text%2Fx-wiki&model=wikitext&wpTextbox1=%3Cnoinclude%3E%7B%7BSandbox%7D%7D%3C%2Fnoinclude%3E%0D%0A%3D%3D+Please+start+your+testing+below+this+line+%3D%3D%0D%0A&wpSummary=&wpSave=Publish+changes&wpTemplateSandboxTemplate=Wikipedia%3ASandbox&wpTemplateSandboxPage=&wpEditToken=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2B%5C&mode=text&wpUltimateParam=1&action=submit&title=Wikipedia%3ASandbox&mfnoscript=1
```
If you click it, it goes back to the edit form (the desktop version if your UA is not mobile), or an error page saying "Request-URI Too Long" (or "The connection was reset" on Firefox) if the wikitext is large.
**What should have happened instead?**:
The buttons work as on the desktop site.
**Other information** (browser name/version, screenshots, etc.):
Reported [[https://en.wikipedia.org/w/index.php?title=Wikipedia:Teahouse&oldid=1150000457#Undo|here]] and [[https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=1150000647#Undo_tool_not_working_on_mobile|here]].