Thanks for creating this. That said, it would help to summarize at least a bit of the conversation we’ve had here, rather than just giving a link.
(E.g. someone is much more likely to pick up this ticket if they don’t have to read through 20+ messages.)
Updated the issue description
I am experiencing the same issue on openmrs-standalone 2.3.1. I am working around it with a Greasemonkey/Tampermonkey script I created (I will post in another comment, as I am restricted to 2 as a new user).
The End Visit anchor href comes out to “javascript:visit.showEndVisitDialog(513)%26visitId%3D513” and I used the script above to correct it to “javascript:visit.showEndVisitDialog(513)”.
Here are screenshots of the current state and the edited, working link.
Greasemonkey/Tampermonkey script workaround: http://www.cxdemo.net/demo-injector/OpenMRS.user.js